Closed graphiclunarkid closed 10 years ago
Looks like this would require a custom validation snippet.
http://rtfm.modx.com/extras/revo/formit/formit.validators
So to be clear, this is what is wanted?
Yes, that's right.
I've written a custom FormIt validator snippet (EmailChecker) for this purpose. Currently implemented on stage home page
FormIt call needs following extra entries:
&customValidators='EmailChecker' &validate='4DRXNE97LE:required, SSQ97709WZ:EmailChecker, url:blank'
Also, have added validator error message:
[[!+fi.error.SSQ97709WZ:!empty=`<p><a href="[[~[[*id]]]]#4DRXNE97LE">Valid email is required with selected option(s)</a></p>`]]
Reproduction steps:
Expected: validation error (must supply an email address to be contacted or subscribed to the list)
Actual: form is submitted.
See also #5