Поддержка серверов

FORM: методы, функции, константы класса Битрикс


Блог разработчика

9 августа 2016 ResizeImageGet и простой водяной знак налету

Сегодня поговорим о том как проще всего воткнуть водяной знак на картинки в Битрикс. Например, на все изображения каталога.

21 июля 2016 Добавление вкладки в CRM коробки Битрикс24

В этом посте я покажу, как легко и просто добавить вкладку в сущность CRM. И не просто добавить, а вывести там свой контент.

21 июля 2016 Как просто обращаться из коробки Битрикс24 на сайт на базе Битрикс

К примеру вам хочется внутренним скриптом дернуть с сайта-магазина информацию, которая там, в свою очередь, закрыта некоторыми правами. Например, админскими. Можно конечно мутить свой REST, или иной формат общения, но проще всего воспользоваться штатным инструментом:

События модуля form

СобытиеВызывается
OnBeforeFormCrmAddCFormCrm::Add
OnAfterFormCrmAddCFormCrm::Add
OnBeforeFormCrmUpdateCFormCrm::Update
OnAfterFormCrmUpdateCFormCrm::Update
OnBeforeFormCrmDeleteCFormCrm::Delete
OnAfterFormCrmDeleteCFormCrm::Delete
onBeforeResultAddCFormResult::Add
onAfterResultAddCFormResult::Add
onBeforeResultStatusChangeCFormResult::SetStatus
onBeforeResultUpdateCFormResult::Update
onAfterResultStatusChangeCFormResult::SetStatus
onAfterResultUpdateCFormResult::Update
onBeforeResultDeleteCFormResult::Delete
onFormValidatorBuildListCFormValidator::GetAllList

Константы модуля form

КонстантаПроверяется
ADMIN_SECTIONCForm::Check
SITE_IDCFormResult::Mail

Список функций и методов модуля form

Метод
CFormEventHandlers::sendOnAfterResultStatusChange($WEB_FORM_ID, $RESULT_ID, $NEW_STATUS_ID = false, $CHECK_RIGHTS = 'Y')
CFormCrm::GetList($arOrder = array(), $arFilter = array(), $arGroupBy = false, $arNavStartParams = false, $arSelectFields = array())
CFormCrm::GetByID($ID)
CFormCrm::GetByFormID($FORM_ID)
CFormCrm::GetFields($LINK_ID)
CFormCrm::_addField($FORM_ID, $CRM_ID, $crm_field)
CFormCrm::SetForm($FORM_ID, $arParams)
CFormCrm::onResultAdded($FORM_ID, $RESULT_ID)
CFormCrm::AddLead($FORM_ID, $RESULT_ID, $arLink = null)
CFormCrm::Add($arFields)
CFormCrm::Update($ID, $arFields)
CFormCrm::Delete($ID)
CFormCrm::_getAllFormFieldsHTML($WEB_FORM_ID, $RESULT_ID, $arAnswers)
CFormCrm::_getAllFormFields($WEB_FORM_ID, $RESULT_ID, $arAnswers)
CFormCrm::CheckFields($action, &$arFields)
CFormCrm::GetFilterOperation($key)
CFormCrm::PrepareSql(&$arFields, $arOrder, &$arFilter, $arGroupBy, $arSelectFields)
CFormCrmSender::__construct($ID, $arAuth = null)
CFormCrmSender::AddLead($arLeadFields)
CFormCrmSender::GetFields($bReload = false)
CFormCrmSender::GetAuthHash()
CFormCrmSender::GetLastResult()
CFormCrmSender::_setAuthHash($hash)
CFormCrmSender::_cacheId()
CFormCrmSender::_query($method, $params = array())
_CFormCrmSenderResult::__construct($result_text)
_CFormCrmSenderResult::code()
_CFormCrmSenderResult::data()
_CFormCrmSenderResult::error()
_CFormCrmSenderResult::field($field)
_CFormCrmSenderResult::_process()
CFormField::err_mess()
CFormField::GetList($WEB_FORM_ID, $get_fields, &$by, &$order, $arFilter=Array(), &$is_filtered)
CFormField::GetByID($ID)
CFormField::GetBySID($SID, $FORM_ID = false)
CFormField::GetNextSort($WEB_FORM_ID)
CFormField::Copy($ID, $CHECK_RIGHTS="Y", $NEW_FORM_ID=false)
CFormField::Delete($ID, $CHECK_RIGHTS="Y")
CFormField::Reset($ID, $CHECK_RIGHTS="Y")
CFormField::GetFilterTypeList(&$arrUSER, &$arrANSWER_TEXT, &$arrANSWER_VALUE, &$arrFIELD)
CFormField::GetTypeList()
CFormField::GetFilterList($WEB_FORM_ID, $arFilter=Array())
CFormField::CheckFields(&$arFields, $FIELD_ID, $CHECK_RIGHTS="Y")
CFormField::Set($arFields, $FIELD_ID=false, $CHECK_RIGHTS="Y", $UPDATE_FILTER="Y")
CFormOutput_old::Init($arParams, $admin = false)
CFormOutput_old::__checkFilter(&$str_error)
CFormOutput_old::__prepareFilter()
CFormOutput_old::Out()
CFormOutput_old::getData(&$arResult)
CFormOutput_old::getListData()
CFormOutput_old::__prepareDataForTpl()
CFormOutput_old::CaptchaInitialize()
CFormOutput_old::ShowAnswer($FIELD_SID)
CFormOutput::CAllFormOutput()
CFormOutput::InitializeTemplate($arParams, $arResult)
CFormOutput::IncludeFormCustomTemplate()
CFormOutput::IncludeFormTemplate()
CFormOutput::isStatisticIncluded()
CFormOutput::__check_form_cache()
CFormOutput::__clear_form_cache_files()
CFormOutput::isFormErrors()
CFormOutput::ShowFormErrors()
CFormOutput::ShowFormErrorsText()
CFormOutput::ShowFormNote()
CFormOutput::ShowFormNoteText()
CFormOutput::isFormNote()
CFormOutput::ShowErrorMsg()
CFormOutput::ShowFormHeader()
CFormOutput::ShowFormFooter()
CFormOutput::__admin_GetInputType($FIELD_SID)
CFormOutput::__admin_GetInputAnswersStructure($FIELD_SID)
CFormOutput::ShowInputCaption($FIELD_SID, $css_style = "")
CFormOutput::__admin_ShowInputCaption($FIELD_SID, $caption_css_class = "", $unform = false)
CFormOutput::ShowInputCaptionImage($FIELD_SID, $sAlign = "", $iMaxW="", $iMaxH="", $bPopup="N", $strPopupTitle="", $sHSpace = "", $sVSpace = "", $sBorder = "")
CFormOutput::isInputCaptionImage($FIELD_SID)
CFormOutput::ShowInput($FIELD_SID, $caption_css_class = '')
CFormOutput::isUseCaptcha()
CFormOutput::ShowCaptchaImage()
CFormOutput::ShowCaptchaField()
CFormOutput::ShowCaptcha()
CFormOutput::ShowSubmitButton($caption = "", $css_style = "")
CFormOutput::ShowApplyButton($caption = "", $css_style = "")
CFormOutput::ShowResetButton($caption = "", $css_style = "")
CFormOutput::ShowFormDescription($css_style = "")
CFormOutput::isFormDescription()
CFormOutput::ShowFormImage($sAlign = "", $iMaxW="", $iMaxH="", $bPopup="N", $strPopupTitle="", $sHSpace = "", $sVSpace = "", $sBorder = "")
CFormOutput::isFormImage()
CFormOutput::ShowFormTitle($css_style = "")
CFormOutput::isFormTitle()
CFormOutput::ShowResultStatusForm()
CFormOutput::ShowResultStatus($bNotShowCSS = "N")
CFormOutput::ShowResultStatusText()
CFormOutput::GetResultStatusCSSClass()
CFormOutput::isResultStatusChangeAccess()
CFormOutput::ShowDateFormat($css_style = "")
CFormOutput::ShowRequired()
CFormOutput::CheckTemplate($FORM_TEMPLATE, &$arrFS)
CFormOutput::PrepareFormData($arrFS)
CFormOutput::setError($error)
CFormOutput::isAccessFormParams()
CFormOutput::isAccessForm()
CFormOutput::isAccessFormResult($arrResult)
CFormOutput::isAccessFormResultEdit()
CFormOutput::isAccessFormResultView()
CFormOutput::isAccessFormResultList()
CFormOutput::getFormImagePath()
CFormOutput::getInputCaptionImagePath($FIELD_SID)
CFormOutput::setInputDefaultValue($FIELD_SID, $value, $ANSWER_ID = false)
CForm::err_mess()
CForm::IsAdmin()
CForm::GetResultAnswerArray($WEB_FORM_ID, &$arrColumns, &$arrAnswers, &$arrAnswersSID, $arFilter=Array())
CForm::GetMailTemplateArray($FORM_ID)
CForm::GetSiteArray($FORM_ID)
CForm::ExecHandlerBeforeChangeStatus($RESULT_ID, $ACTION, $NEW_STATUS_ID=0)
CForm::ExecHandlerAfterChangeStatus($RESULT_ID, $ACTION)
CForm::GetPermissionList($get_default="Y")
CForm::GetPermission($form_id, $arGroups=false, $get_from_database="")
CForm::GetTemplateList($type="SHOW", $path="xxx", $WEB_FORM_ID=0)
CForm::GetMenuList($arFilter=Array(), $check_rights="Y")
CForm::GetNextSort()
CForm::ShowRequired($flag)
CForm::GetTextFilter($FID, $size="45", $field_text="class=\"inputtext\"", $field_checkbox="class=\"inputcheckbox\"")
CForm::GetDateFilter($FID, $form_name="form1", $show_select="Y", $field_select="class=\"inputselect\"", $field_input="class=\"inputtext\"")
CForm::GetNumberFilter($FID, $size="10", $field="class=\"inputtext\"")
CForm::GetExistFlagFilter($FID, $field="class=\"inputcheckbox\"")
CForm::GetCrmFlagFilter($FID, $field="class=\"inputselect\"")
CForm::GetDropDownFilter($ID, $PARAMETER_NAME, $FID, $field="class=\"inputselect\"")
CForm::GetTextValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetHiddenValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetPasswordValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetEmailValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetUrlValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetTextField($FIELD_NAME, $VALUE="", $SIZE="", $PARAM="")
CForm::GetHiddenField($FIELD_NAME, $VALUE="", $PARAM="")
CForm::GetEmailField($FIELD_NAME, $VALUE="", $SIZE="", $PARAM="")
CForm::GetUrlField($FIELD_NAME, $VALUE="", $SIZE="", $PARAM="")
CForm::GetPasswordField($FIELD_NAME, $VALUE="", $SIZE="", $PARAM="")
CForm::GetDropDownValue($FIELD_NAME, $arDropDown, $arrVALUES=false)
CForm::GetDropDownField($FIELD_NAME, $arDropDown, $VALUE, $PARAM="")
CForm::GetMultiSelectValue($FIELD_NAME, $arMultiSelect, $arrVALUES=false)
CForm::GetMultiSelectField($FIELD_NAME, $arMultiSelect, $arSELECTED=array(), $HEIGHT="", $PARAM="")
CForm::GetDateValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetDateField($FIELD_NAME, $FORM_NAME, $VALUE="", $FIELD_WIDTH="", $PARAM="")
CForm::GetCheckBoxValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetCheckBoxField($FIELD_NAME, $FIELD_ID, $VALUE="", $PARAM="")
CForm::GetRadioValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetRadioField($FIELD_NAME, $FIELD_ID, $VALUE="", $PARAM="")
CForm::GetTextAreaValue($FIELD_NAME, $arAnswer, $arrVALUES=false)
CForm::GetTextAreaField($FIELD_NAME, $WIDTH="", $HEIGHT="", $PARAM="", $VALUE="")
CForm::GetFileField($FIELD_NAME, $WIDTH="", $FILE_TYPE="IMAGE", $MAX_FILE_SIZE=0, $VALUE="", $PARAM_FILE="", $PARAM_CHECKBOX="")
CForm::GetDataByID($WEB_FORM_ID, &$arForm, &$arQuestions, &$arAnswers, &$arDropDown, &$arMultiSelect, $additional="N", $active="N")
CForm::__check_PushError(&$container, $MESSAGE, $key = false)
CForm::Check($WEB_FORM_ID, $arrVALUES=false, $RESULT_ID=false, $CHECK_RIGHTS="Y", $RETURN_ARRAY="N")
CForm::CheckFields($arFields, $FORM_ID, $CHECK_RIGHTS="Y")
CForm::Set($arFields, $FORM_ID=false, $CHECK_RIGHTS="Y")
CForm::Copy($ID, $CHECK_RIGHTS="Y")
CForm::Delete($ID, $CHECK_RIGHTS="Y")
CForm::Reset($ID, $CHECK_RIGHTS="Y")
CForm::SetMailTemplate($WEB_FORM_ID, $ADD_NEW_TEMPLATE="Y", $old_SID="", $bReturnFullInfo = false)
CForm::GetBySID($SID)
CForm::isFieldInTemplate($FIELD_SID, $tpl)
CForm::isCAPTCHAInTemplate($tpl)
CForm::GetByID_admin($WEB_FORM_ID, $current_section = false)
CFormStatus::err_mess()
CFormStatus::GetPermissionList($STATUS_ID, &$arPERMISSION_VIEW, &$arPERMISSION_MOVE, &$arPERMISSION_EDIT, &$arPERMISSION_DELETE)
CFormStatus::GetMaxPermissions()
CFormStatus::GetPermissions($STATUS_ID)
CFormStatus::GetNextSort($WEB_FORM_ID)
CFormStatus::GetDefault($WEB_FORM_ID)
CFormStatus::CheckFields($arFields, $STATUS_ID, $CHECK_RIGHTS="Y")
CFormStatus::Set($arFields, $STATUS_ID=false, $CHECK_RIGHTS="Y")
CFormStatus::Delete($ID, $CHECK_RIGHTS="Y")
CFormStatus::Copy($ID, $CHECK_RIGHTS="Y", $NEW_FORM_ID=false)
CFormStatus::SetMailTemplate($WEB_FORM_ID, $STATUS_ID, $ADD_NEW_TEMPLATE="Y", $old_SID="", $bReturnFullInfo = false)
CFormStatus::GetMailTemplateArray($STATUS_ID)
CFormStatus::GetTemplateList($STATUS_ID)
CFormAnswer::err_mess()
CFormAnswer::Copy($ID, $NEW_QUESTION_ID=false)
CFormAnswer::Delete($ID, $QUESTION_ID=false)
CFormAnswer::GetTypeList()
CFormAnswer::GetList($QUESTION_ID, &$by, &$order, $arFilter=Array(), &$is_filtered)
CFormAnswer::GetByID($ID)
CFormAnswer::CheckFields($arFields, $ANSWER_ID=false)
CFormAnswer::Set($arFields, $ANSWER_ID=false)
CFormResult_old::GetDataByIDForWeb($RESULT_ID, $GET_ADDITIONAL="N")
CFormResult_old::GetMaxPermissions()
CFormResult_old::Edit($RESULT_ID, $arrVALUES, $TEMPLATE="", $EDIT_ADDITIONAL="N", $EDIT_STATUS="N")
CFormResult_old::Show($RESULT_ID, $TEMPLATE="", $TEMPLATE_TYPE="show", $SHOW_ADDITIONAL="N", $SHOW_ANSWER_VALUE="Y", $SHOW_STATUS="N")
CFormResult::err_mess()
CFormResult::GetFileByAnswerID($RESULT_ID, $ANSWER_ID)
CFormResult::GetFileByHash($RESULT_ID, $HASH)
CFormResult::SetEvent($RESULT_ID, $IN_EVENT1=false, $IN_EVENT2=false, $IN_EVENT3=false, $money="", $currency="", $goto="", $chargeback="N")
CFormResult::GetDataByID($RESULT_ID, $arrFIELD_SID, &$arrRES, &$arrANSWER)
CFormResult::GetDataByIDForHTML($RESULT_ID, $GET_ADDITIONAL="N")
CFormResult::Add($WEB_FORM_ID, $arrVALUES=false, $CHECK_RIGHTS="Y", $USER_ID=false)
CFormResult::Update($RESULT_ID, $arrVALUES=false, $UPDATE_ADDITIONAL="N", $CHECK_RIGHTS="Y")
CFormResult::SetField($RESULT_ID, $FIELD_SID, $VALUE=false)
CFormResult::Delete($RESULT_ID, $CHECK_RIGHTS="Y")
CFormResult::Reset($RESULT_ID, $DELETE_FILES=true, $DELETE_ADDITIONAL="N", $arrException=array())
CFormResult::SetStatus($RESULT_ID, $NEW_STATUS_ID, $CHECK_RIGHTS="Y")
CFormResult::Mail($RESULT_ID, $TEMPLATE_ID = false)
CFormResult::GetCount($WEB_FORM_ID)
CFormResult::PrepareFilter($WEB_FORM_ID, $arFilter)
CFormResult::SetCRMFlag($RESULT_ID, $flag_value)
CFormValidator::err_mess()
CFormValidator::GetList($FIELD_ID, $arFilter = array(), &$by, &$order)
CFormValidator::GetListForm($WEB_FORM_ID, $arFilter = array(), &$by, &$order)
CFormValidator::__getList($arFilter = array(), &$by, &$order)
CFormValidator::GetAllList($arFilter = array())
CFormValidator::Execute($arValidator, $arQuestion, $arAnswers, $arAnswerValues)
CFormValidator::Set($WEB_FORM_ID, $FIELD_ID, $sValSID, $arParams = array(), $C_SORT = 100)
CFormValidator::SetBatch($WEB_FORM_ID, $FIELD_ID, $arValidators)
CFormValidator::GetSettingsString($arValidator, $arParams)
CFormValidator::GetSettingsArray($arValidator, $strParams)
CFormValidator::GetSettings($arValidator)
CFormValidator::Clear($FIELD_ID)
CForm_old::GetFileValue($RESULT_ID, $ANSWER_ID)
CForm_old::Show($WEB_FORM_VARNAME, $arrVALUES=false, $SHOW_TEMPLATE=false, $PREVIEW="N")
CForm_old::IsOldVersion()
CForm_old::GetClosedFields($WEB_FORM_ID, $arrFields)
CForm_old::GetByVarname($VARNAME)
CForm_old::GetResultList($WEB_FORM_ID, &$by, &$order, $arFilter=Array(), &$is_filtered, $CHECK_RIGHTS="Y", $records_limit=false)
CForm_old::GetResultByID($RESULT_ID)
CForm_old::GetResultFields($RESULT_ID, $arrFIELD_VARNAME, &$arrRES, &$arrANSWER)
CForm_old::GetResultValuesFromDB($RESULT_ID, $GET_ADDITIONAL="N")
CForm_old::Add($WEB_FORM_ID, $arrVALUES=false, $CHECK_RIGHTS="Y", $USER_ID=false)
CForm_old::Update($RESULT_ID, $arrVALUES=false, $UPDATE_ADDITIONAL="N", $CHECK_RIGHTS="Y")
CForm_old::SetResultField($RESULT_ID, $FIELD_VARNAME, $VALUE)
CForm_old::GetResultPermission($RESULT_ID, &$CURRENT_STATUS_ID)
CForm_old::AddResultAnswer($arFields)
CForm_old::UpdateResultField($arFields, $RESULT_ID, $FIELD_ID)
CForm_old::DeleteResult($ID, $CHECK_RIGHTS="Y")
CForm_old::ResetResult($ID, $WEB_FORM_ID, $DELETE_IMAGES=true, $DELETE_ADDITIONAL="N", $arrException=array())
CForm_old::ShowResult($RESULT_ID, $TEMPLATE="", $TEMPLATE_TYPE="show", $SHOW_ADDITIONAL="N", $SHOW_ANSWER_VALUE="Y", $SHOW_STATUS="N")
CForm_old::EditResult($RESULT_ID, $arrVALUES, $TEMPLATE="", $EDIT_ADDITIONAL="N", $EDIT_STATUS="N")
CForm_old::SetResultStatus($WEB_FORM_ID, $RESULT_ID, $NEW_STATUS_ID, $CHECK_RIGHTS="Y")
CForm_old::Mail($RESULT_ID, $TEMPLATE_ID="")
CForm_old::GetResultsCount($WEB_FORM_ID)
CForm_old::PrepareResultFilter($WEB_FORM_ID, $arFilter)
CForm_old::SetEvent($RESULT_ID, $IN_EVENT1=false, $IN_EVENT2=false, $IN_EVENT3=false, $money="", $currency="", $goto="", $chargeback="N")
CForm_old::GetFieldList($WEB_FORM_ID, $additional, &$by, &$order, $arFilter=Array(), &$is_filtered)
CForm_old::GetFieldByID($ID)
CForm_old::GetFieldByVarname($SID)
CForm_old::DeleteField($WEB_FORM_ID, $ID, $CHECK_RIGHTS="Y")
CForm_old::ResetField($WEB_FORM_ID, $ID, $CHECK_RIGHTS="Y")
CForm_old::GetFilterTypeList(&$arrUSER, &$arrANSWER_TEXT, &$arrANSWER_VALUE, &$arrFIELD)
CForm_old::GetAdditionaFieldTypeList()
CForm_old::GetAnswerByID($ID)
CForm_old::DeleteAnswer($ID)
CForm_old::GetAnswerList($FIELD_ID, &$by, &$order, $arFilter=Array(), &$is_filtered)
CForm_old::GetAnswerTypeList()
CForm_old::GetFilterList($WEB_FORM_ID, $arFilter=Array())
CForm_old::GetStatusPermission($STATUS_ID)
CForm_old::GetNextStatusSort($WEB_FORM_ID)
CForm_old::GetDefaultStatus($WEB_FORM_ID)
CForm_old::GetStatusList($WEB_FORM_ID, &$by, &$order, $arFilter=array(), &$is_filtered)
CForm_old::GetStatusByID($ID)
CForm_old::GetStatusDropdown($WEB_FORM_ID, $PERMISSION="MOVE", $OWNER_ID=0)
CFormOutput::err_mess()
CFormOutput::CFormOutput()
CForm::GetList(&$by, &$order, $arFilter=Array(), &$is_filtered, $min_permission=10)
CForm::GetByID($ID, $GET_BY_SID="N")
CForm::GetFormTemplateByID($ID, $GET_BY_SID="N")
CFormStatus::GetList($FORM_ID, &$by, &$order, $arFilter=array(), &$is_filtered)
CFormStatus::GetByID($ID)
CFormStatus::GetDropdown($FORM_ID, $PERMISSION = array("MOVE"), $OWNER_ID=0)
CFormResult::GetList($WEB_FORM_ID, &$by, &$order, $arFilter=Array(), &$is_filtered, $CHECK_RIGHTS="Y", $records_limit=false)
CFormResult::GetByID($ID)
CFormResult::GetPermissions($RESULT_ID, &$CURRENT_STATUS_ID)
CFormResult::AddAnswer($arFields)
CFormResult::UpdateField($arFields, $RESULT_ID, $FIELD_ID)
SenderEventHandler::onConnectorListForm($data)
SenderConnectorForm::getName()
SenderConnectorForm::getCode()
SenderConnectorForm::requireConfigure()
SenderConnectorForm::getData()
SenderConnectorForm::getForm()
form::form()
form::DoInstall()
form::InstallDB()
form::InstallFiles()
form::InstallEvents()
form::DoUninstall()
form::UnInstallDB($arParams = Array())
form::UnInstallFiles($arParams = array())
form::UnInstallEvents()
form::GetModuleRightList()