Answer the question
In order to leave comments, you need to log in
Bitrix: How to return error text in events?
Using OnBeforePostAdd to check captcha
function OnBeforePostAdd_checkCaptchaCode(&$arResult, &$arUserResult){
global $APPLICATION;
if( isset($_POST['captcha_word']) && isset($_POST['captcha_sid']) && !$APPLICATION->CaptchaCheckCode($_POST['captcha_word'], $_POST['captcha_sid'])) {
$arResult['ERROR_MESSAGE']= 'Введите правильно "Код" с картинки';
return false;
}
return true;
}
</code
Не могу понять, как выводить ошибку о том, что код с картинки введен не правильно. Показывается
Error saving data to database.
и все...
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