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.

Any way to submit data at every page?

  1. Naatan
    Member

    I'm making a multi-page form where each consecutive page is optional, and I want to submit data once they click next for every page they filled out.

    Is this somehow possible already or do I need to add this functionality myself?

    Thanks

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  2. A multi-page form is NOT submitted until the final page is submitted. There is no partial data storage. The form isn't processed until the final page is submitted.

    The purpose of multi-page forms is to break up long forms to make them less intimidating and to encourage users to complete the process. The longer the form, the less likely it is to be completed. Splitting the form into multiple pages makes the form seem a little less daunting.

    Partially saving data is a privacy and transparency issue. Users don't expect information to be received and stored until the form is fully submitted and a confirmation action is displayed.

    Not all abandoned forms are going to be accidental. Typically it's going to be because the user decided to not complete the form. Capturing partially filled out forms that a user may have purposely chosen NOT to submit because they decided against it at some point during the process is not something we agree with and not something we ever intend on implementing.

    We do plan on implementing save and continue functionality but it will be done in a way that it is clear to the user what is happening and what it is going to do for situations where the user wants to complete the process but doesn't have time so they want to save their progress and continue at a later time.

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  3. Naatan
    Member

    Thanks for the response Carl.

    I should probably clear up my use-case, as I'm not at all trying to capture data on abandoned forms.

    Basically people will be signing up to newsletters with just their E-Mail, once they've done that the confirmation page will give them the option to also sign up to additional "services" if they answer a couple of questions. Of course I don't want to be asking them for their E-Mail again, so I'd want to take this from the previous form.

    The challenges here (as far as I can see) are;

    - Capturing data from a previous form they filled out and using it in the new one
    - Showing a new form along with the confirmation of the previous one
    - In my case, all this needs to be done through Ajax as it will all be inside a widget

    I can think of many ways to "hack" this into Gravity Forms (read: write plugins for it), but if I can do it without writing any code, that would of course be preferable.

    So, any idea? Would this be possible?

    Thanks

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  4. Yea, it's definitely possible. You can do this using 2 different forms with the 2nd form optional. Just create 2 different forms. Then configure the first form to redirect to the page containing the second form for it's confirmation. You can then configure it to pass form field data via the query string to the page containing the second form. This can then pre-populate fields in the second form, including hidden fields.

    What I described above can be done completely without code. You just use the URL Redirect option on the confirmation to redirect to the page containing the second form and the query string builder with the URL Redirect option to build your query string to pass form field data (ex. email=the@email.com)

    Then you would configure your second form so that the fields you want to dynamically populate are configured to be allowed to be populated dynamically and set the parameter name for the fields via the Advanced tab so the parameter matches what you are using to pass the field value via the query string (if you are passing email=the@email.com in the query string then email is the parameter name).

    You can read more on how to dynamically populate a field, including via the query string, here:

    http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  5. Naatan
    Member

    Thanks Carl, that sounds very interesting, I love how much you can do with this plugin.

    However with your solution they would be redirected at the end of the first form, whereas in my implementation it would have to work with Ajax (seeing as the form is in a widget and not the main object of the page).

    I'm not expecting you to have a solution for this and I don't mind working around the problem.. nevertheless if there IS something you can recommend me that'd be much appreciated :)

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  6. Yea, if you are using AJAX it isn't going to be seamless. It would require a page refresh to redirect to the second form. I can't think of any solutions to this off the top of my head.

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  7. Naatan
    Member

    Ok, how about Javascript hooks? Is there any way for third party scripts to be aware that a Gravity form just got submitted?

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  8. It might be possible via jQuery. There are hooks that Javascript hooks that are triggered at various points. You can read more in the Developer Documentation area here:

    http://www.gravityhelp.com/documentation/page/Developer_Docs

    Posted 12 years ago on Thursday September 29, 2011 | Permalink
  9. Naatan
    Member

    Thanks Carl, worked like a charm. I just embedded 2 forms and made the second hidden. Once the first is submitted I unhide the second and manually copy over the email field from the first form to a hidden field in the second form.

    Posted 12 years ago on Friday September 30, 2011 | Permalink

This topic has been resolved and has been closed to new replies.