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.

Redirect if form is not filled in correctly

  1. JonC
    Member

    Hi,

    Only just started using Gravity Forms so this may a be a stupid question!

    I have contact forms dotted throughout my site on product pages, the forms are about halfway down the page.
    The forms have several required fields that need filling.
    If a required field is not filled then on submission of the form, the page reloads with a message telling user to fill in required fields - however this message is on the contact form which is halfway down the page (page reloads with the top section showing).

    Is there any way to get it reloading with the contact form showing if I was to use something in the code to signify anchor such as (example.co.uk/product/#form) ? Can't find anywhere to add any code to do this!

    Posted 12 years ago on Monday December 10, 2012 | Permalink
  2. Richard Vav
    Administrator

    You should take a look at the gform confirmation anchor filter,
    http://www.gravityhelp.com/documentation/page/Gform_confirmation_anchor

    I haven't tried it my self so I don't know for sure if it also works when validation fails, your other option would be to enable ajax

    Posted 12 years ago on Monday December 10, 2012 | Permalink
  3. JonC
    Member

    Thanks I'll give that a try!

    Anybody know if there is one way to do this with several form id's or do I have to do it for everyform form Id I need to redirect?

    Posted 12 years ago on Monday December 10, 2012 | Permalink
  4. Richard Vav
    Administrator

    The first example applies to all forms, it is only when you add an underscore and number that is is only applied to the one form.

    Posted 12 years ago on Monday December 10, 2012 | Permalink
  5. JonC
    Member

    Cheers, thank you I shall give it a try later when I get home! :)

    Posted 12 years ago on Monday December 10, 2012 | Permalink