Answer the question
In order to leave comments, you need to log in
How to customize the bitrix:form component?
I need to make validation a hidden field. The form is standard, I add a hidden field to my template, everything is fine. Now I need to customize the component, this is a regular form, bitrix:form is connected. Now, in theory, I need to make a check, if the field is filled, then do not save the results of the form. I don’t understand where to enter this check ((((
There is already a check in main.register, you just need to change it a little, but where to enter the bitrix:form check?
In theory, you need to change form.result.new but where should the check be
UPD
That's it, don't need it anymore! :) If
anyone needs it: in form.result.new (transfer the current to your custom components) where the
if (check_bitrix_sessid()) check is performed,
replace it with
if (!check_bitrix_sessid() && !empty($_REQUEST["NAME_USER_FALSE"]))
{
die();
}
if (check_bitrix_sessid() && empty($_REQUEST["NAME_USER_FALSE"]))
{
$return = false;
etc. component code
where $_REQUEST["NAME_USER_FALSE"] is the name of your hidden field
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question