cheesegrits
Support Gopher
Sometimes you need to do custom validation on a form which just can't be done with a regular expression (regex).
As of SVN rev# 1032 of Fabrik 1.0.6, you can now raise validation errors from your form submit scripts, as long as they are "As soon as form is submitted (simple eval)", by setting ...
$arCustomErrors['table_name___element_name'][] = 'Some error message';
... in your submit script. You can set error messages for more than one element name. The form will then act exactly as if the specified element(s) had failed a normal Fabrik validation, i.e. it'll reshow the form, with the error message(s) next to the element(s) you specified in the array.
For a real life example, see this thread:
http://fabrikar.com/forums/showthread.php?p=40288#post40288
-- hugh
As of SVN rev# 1032 of Fabrik 1.0.6, you can now raise validation errors from your form submit scripts, as long as they are "As soon as form is submitted (simple eval)", by setting ...
$arCustomErrors['table_name___element_name'][] = 'Some error message';
... in your submit script. You can set error messages for more than one element name. The form will then act exactly as if the specified element(s) had failed a normal Fabrik validation, i.e. it'll reshow the form, with the error message(s) next to the element(s) you specified in the array.
For a real life example, see this thread:
http://fabrikar.com/forums/showthread.php?p=40288#post40288
-- hugh