WordPress Gravity Forms Multiple Forms Multiple Submissions

I have a page with multiple instances of the same Gravity Form short code (with different variable parameters) that open in a light box. Each form is passed variables so that the notification email and other defaults are different even though the form is the same. I would like a user to be able to submit one instance of the form. (Which will be directed to one email) and then submit a different instance of the form (which will be directed to a different email address).

All the items I have mentioned I have working. My challenge is that when I try to open a second instance of the form after having submitted it once already I get the "Thank You" response instead of the form. Is there a way I can use a hook to clear or set something after the form has been sent? Maybe a div needs to be shown or hid?

Same questioned asked herewordpress gravity forms submit multiple times

2 Answers

I can think of two solutions:

  1. Implement the forms in <iframes> so that each form submission truly happens on a separate page even though it gives the illusion of the forms all being available on the same page.

  2. I've written a plugin which allows you to reload any AJAX-enabled form (). In the demo, you click a link to reload the form; however, it also provides an option to automatically reload the form after X seconds. Additionally, you can trigger the reload manually (like when the popup containing the form is closed) anywhere in your javascript like so:

    gwrf.reloadForm();

Although I know the post is old but I want to put my suggestions which may be useful with following steps:

  1. Create multiple instance form with gravity multiple instance form plugin.

  2. Change the plugin so that form instance's form-id get sequencial ( if form id: 15 then instance's ids will be 151,152 ...) rather than random number.

  3. Now put a hidden field in the form and set default value as form-id ( indirectely its instance id).

  4. Go to form setting notification and set routing with instance ids with respect to hidden field.

[ Note: form submission with AJAX.]

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like