Hi
I have a site on Cmsms 2.2.16 and PHP 7.3.33 that's using FormBuilder 1.1, FormBrowser 0.5 and Captcha 1.0.1 (with reCAPTCHA v3).
There's an enquiry form containing:
• an ‘Email Results Based on Pulldown’ field,
• a textarea for the main enquiry detail
• other standard ‘contact’ fields, such as name, email etc, some including regexes
• a ‘Deposition to FormBrowser’ field
Some spam is still getting through and recipients would like it reduced to zero (or as close as reasonably practical).
As there are some distinct characteristics of the spam submissions, I was wondering about the practicalities of either or both of the following:
a) Intercepting the ‘automatic validation’ that’s on the main textarea input and adding a regex to only allow submissions that don’t contain the signature characteristics.
b) Allow all submissions, but skip the ‘Email results’ action for submissions containing any of the signature characteristic.
I'm thinking that a UDT might be involved and as it'll be my first, all guidance getting me up the learning curve gratefully received.
Thanks in advance
Formbuilder validation
Re: Formbuilder validation
This part from the help almost says it all:
print_r($params);
die();
to see what information is available.
Also note that some fields already have a possibility to do a regex validation. Though that's limited compared to the possibilities with a UDT.
You can start the udt withValidation UDT. Set this for a form, and the UDT will receive all of the form's human-readable results. The UDT should do whatever validation it wants, and return an array with the first value being true or false (indication whether the form validates), and the second value being error messages (if any).
print_r($params);
die();
to see what information is available.
Also note that some fields already have a possibility to do a regex validation. Though that's limited compared to the possibilities with a UDT.