AddEventHandler('form', 'onBeforeResultAdd', 'my_onBeforeResultAdd'); function my_onBeforeResultAdd($WEB_FORM_ID, &$arFields, &$arrVALUES) { global $APPLICATION; $spam = false; foreach($arrVALUES as $prop => $val) { if (strstr($prop, 'form_') && strstr($val, 'http')) { $spam = true; break; } } if ($spam == true) { $err_str = ' !'; $APPLICATION->ThrowException($err_str); return false; } }