Hi,
I followed your documentation for the validation hook and have got it working for one field, thanks.
My form has about 20 fields that need custom validation, would i need to re-write the entire code for each field?
Hi,
I followed your documentation for the validation hook and have got it working for one field, thanks.
My form has about 20 fields that need custom validation, would i need to re-write the entire code for each field?
Does the same validation need to apply to each field? Please post more details of your setup, and the code you are using for validation. Thanks.
Each field has different validation.
You can see 2 here: http://pastie.org/2360402
So if i continue down this road i will keep repeating the same code 20 times but with a different function for each. Is there are cleaner, less cumbersome way of doing this?
My form is a 4 page form and can be found: http://dev.wantapaydayloan.co.uk/apply-now/
Thanks.
Is the validation for each of your 20 fields different, the same, or a mix? If it's the same you could write a reusable function that you use when validating a field. You should be able to use the gform_validation hook to validate multiple fields at once, it all depends on how you write the code.