add form functionality to AJAX preprocess automatic modal