PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Failed validation redirect

  1. I would like to have a validation error that will email me and redirect the user to another page.
    (i.e. have "no duplicates" selected in the email field and upon fail will still email me and send the user to a new page). Any help will be appreciated!

    Posted 13 years ago on Tuesday July 12, 2011 | Permalink
  2. If you want Gravity Forms to send you an email when there is a validation error on a specific field you would have to write your own custom validation to do this. We have a gform_validation API hook that lets you write custom validation so you can do whatever you want.

    Here is a tutorial on how the gform_validation hook works:

    http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_valiation%22_Hook

    Posted 13 years ago on Tuesday July 12, 2011 | Permalink
  3. My guess is I would add something here:
    $field['validation_message'] = 'The VIN number you have entered is not valid.';

    So I would set up a $email variable or a $email-redirect variable to pass through?

    Posted 13 years ago on Tuesday July 12, 2011 | Permalink
  4. You would have to write the necessary PHP to send the email. Gravity Forms isn't going to send the email. So you'd have to roll your own PHP to handle sending an email to your email address notifying you of the validation error as part of the custom code you implement using the gform_validation hook.

    Posted 13 years ago on Tuesday July 12, 2011 | Permalink
  5. I can't modify the current validation? It is already validating the email field, I just want it to do something different when it fails. I don't want to reinvent the wheel. Mainly because I dont know how to. :-)

    Posted 13 years ago on Wednesday July 13, 2011 | Permalink