$this->smarty->assign('fb_form_has_validation_errors', 0); $this->smarty->assign('fb_show_submission_errors', 0); $this->smarty->assign('fb_form_header', $aeform->RenderFormHeader()); $this->smarty->assign('fb_form_footer', $aeform->RenderFormFooter()); $finished = false; $fieldExpandOp = false; if (isset($params['fbrp_callcount'])) { $fbrp_callcount = (int) $params['fbrp_callcount']; } foreach ($params as $pKey => $pVal) { if (substr($pKey, 0, 9) == 'fbrp_FeX_' || substr($pKey, 0, 9) == 'fbrp_FeD_') { // expanding or shrinking a field $fieldExpandOp = true; } } if (!$fieldExpandOp && ($aeform->GetPageCount() > 1 && $aeform->GetPageNumber() > 0 || isset($params['fbrp_done']) && $params['fbrp_done'] == 1)) { $ok = true; // Validate form $res = $aeform->Validate(); if ($res[0] === false) { $ok = false; $this->smarty->assign('fb_form_validation_errors', $res[1]); $this->smarty->assign('fb_form_has_validation_errors', 1); $aeform->PageBack(); } // Manage fileuploads $res = $aeform->manageFileUploads(); if ($res[0] === false) { $ok = false; $this->smarty->assign('fb_form_validation_errors', $res[1]); $this->smarty->assign('fb_form_has_validation_errors', 1);