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.

Change main form message with gform_validation

  1. stevorevo

    I am using gform_validation and need to change the main error message (not for individual field/s) in the event that an error occurs and could possibly be related to multiple fields (e.g., it's a login form and the email and/or password could be wrong but I just want to display one message that says email or password is invalid). I found add_filter('gform_validation_message') but cannot figure out how to call that from within my validation function. Can you point me in the right direction?

    Also, can I do a redirect from within a function that is called using a gravity forms hook?

    Thank you.

    Posted 7 years ago on Tuesday February 26, 2013 | Permalink
  2. You would use the gform_validation_message filter to change the message for your form, no matter what, and it will be displayed only when the form otherwise fails validation. So, instead of the visitor seeing "There was a problem with your submission. Errors have been highlighted below." they would see "Email or password is invalid." Is that what you're trying to do?

    What do you mean exactly with your second question? Are you trying to redirect the user from within your gform_validation function? If so, please see this:

    Posted 7 years ago on Saturday March 2, 2013 | Permalink