Hi,
How is it possible to write a custom validation rule for a form field based on the value entered in another field within the same form?
Example: Startdate and enddate, enddate shouldn't be before startdate.
Regards, don't get flooded,
Michael
Hi,
How is it possible to write a custom validation rule for a form field based on the value entered in another field within the same form?
Example: Startdate and enddate, enddate shouldn't be before startdate.
Regards, don't get flooded,
Michael
You can. Use the gform_validation hook to do the validation for you, then do your comparison in php (in your theme's functions.php) and if there is an error, return the error with your error message.
http://www.gravityhelp.com/documentation/page/Gform_validation
I was too focused on the entry object. I forgot I can just use the $_POST data to compare any fields.
Regards
Glad you got that working. Thanks for the reply.