"EDIT_URL" => "result_edit.php", "CHAIN_ITEM_TEXT" => "Forms List", "CHAIN_ITEM_LINK" => "result_list.php?WEB_FORM_ID=".$_REQUEST["WEB_FORM_ID"] )); Parameters: $WEB_FORM_ID - web-form ID $LIST_URL - page URL for redirecting user after "Save" button press (if empty, there is no redirecting) $EDIT_URL - page URL for redirecting user after "Apply" button press (if empty, there is no redirecting) $CHAIN_ITEM_TEXT - additional item name in the navigation chain (if empty, no item is added) $CHAIN_ITEM_LINK - additional item link in the navigation chain ***********************************************************************/ global $USER, $APPLICATION; $APPLICATION->SetTemplateCSS("form/form.css"); if (CModule::IncludeModule("form")) { IncludeTemplateLangFile(__FILE__); // create form output class $FORM = new CFormOutput(); //initialize&check form if ($FORM->Init($arParams)) { // output form $FORM->Out(); } else { echo ShowError(GetMessage($FORM->ShowErrorMsg())); } } else { echo ShowError(GetMessage("FORM_MODULE_NOT_INSTALLED")); } //endif (CModule::IncludeModule("form"));
/*************************************************************/ // additional caching if ($bCache && $FORM->isAccessForm() && $cache_form->StartDataCache()) { // cache form image path and code $FORM->ShowFormImage(); $FORM->getFormImagePath(); // cache form question images path and code foreach ($FORM->arQuestions as $FIELD_SID => $arQuestion) { $FORM->ShowInputCaptionImage($FIELD_SID); $FORM->getInputCaptionImagePath($FIELD_SID); } // put $FORM to cache $cache_form->EndDataCache(array("FORM" => $FORM)); } } $bFormShow = strlen($FORM->ShowErrorMsg()) <= 0; // show form if ($bFormShow) { // insert chain item if (strlen($FORM->arParams["CHAIN_ITEM_TEXT"]) > 0) { $APPLICATION->AddChainItem($FORM->arParams["CHAIN_ITEM_TEXT"], $FORM->arParams["CHAIN_ITEM_LINK"]); } // initialize CAPTCHA if ($FORM->arForm["USE_CAPTCHA"] == "Y") { $FORM->CaptchaInitialize(); } // get additional data from $FORM and process form result; $arResult = $FORM->getData($arResult); // include CSS with additional icons for Site Edit mode if ($APPLICATION->GetShowIncludeAreas() && $USER->IsAdmin()) { $APPLICATION->SetAdditionalCSS($this->GetPath() . "/icons.css");