If you use AJAX when embedding the form, the page will scroll automatically to the validation error when it fails validation. Can you use AJAX when you embed this form in the page?
If not, you can use some additional JavaScript to scroll the page to the div.validation_error after the form is submitted, when there is an error. This user explains how to do that: http://jeffsebring.com/2012/validation-confirmation-hidden-gravity-forms-wordpress/
His reasons were different but the approach is the same: check to see if the form was submitted and if so, check for a validation error, then scroll the page to that div.
This post may be helpful as well (checking for the existence of the validation_error div): http://www.gravityhelp.com/forums/topic/call-javascript-function-upon-validation-error#post-16766
Posted 11 years ago on Monday February 4, 2013 |
Permalink