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.

Two stage form with "double data submission"

  1. Hello

    I'm trying to create a two part that would function like this:

    -Form 1: enter email address, hit submit which would take you to form 2
    -Form 2: email address field pre-populated with email from Form 1, fill out remaining fields, hit submit.

    I can happily get that working, passing the email address via a query string to Form 2. BUT... I need to submit the email address in Form 1 into the DB, then add to this same DB entry any additional data from the fields in Form 2.

    Is this possible? Any hints much appreciated,

    Thanks
    Dave

    Posted 11 years ago on Friday July 27, 2012 | Permalink
  2. I've done something like this in the past, to capture lead information early on, in case the visitor abandons the form. In that case, I rely on the "latest" form submission (the last one) for the most complete information (form 2.) I completely ignore entries in form 1 if there is a matching entry for form 2. Since the entry for form 2 is complete, can you use that, rather than try to update the entry in form 1?

    There is no easy way to update the entry in form 1. You could do it, if you need to. You would have to have an admin only field (or fields) of the information being captured by form 2 that you need in the entry of form 1. Then, you need to pass the entry ID to form 2 (also hidden or admin only.) Then after accepting the form 2 submission, with complete information, use the gform_after_submission hook to update the entry ID from form 1. You can do it, but I am wondering if you need to, or if you can use the entries in form 2, which are more complete.

    Posted 11 years ago on Sunday July 29, 2012 | Permalink
  3. Thanks for your response.

    At the moment I am doing this:

    <form id="subscribe" action="http://www.website.com/subscribe/?email=email_addr">
    <input size="20" type="email" id="email_addr" name="email_addr" placeholder="email address">
    <input type="submit" value="subscribe" />
    </form>

    I like your idea of having two forms for Stage 1 and Stage 2, but how can I change the form action in the code above to submit into a GF form?

    I need to embed the form code directly into the template.

    Thanks!
    Dave

    Posted 11 years ago on Saturday August 4, 2012 | Permalink
  4. What is this form for? You did not mention this previously. Can you explain in more specific terms exactly what you're trying to do? Generalities are not helping us at this point. Let us know specifically what you need to do, and we'll help you with specific assistance.

    Do either of these forms NEED to be non-Gravity Forms? I can't see a reason for changing the form action. However, if you need to change the form action (which I think is probably the wrong approach) you can use the gform_form_tag filter:

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

    Posted 11 years ago on Saturday August 4, 2012 | Permalink
  5. OK here we go. This is the aim of the subscription mechanism:

    1. A "quick subscribe" form in the site header, where a user just has to enter an email address, hit submit and then to get added to a list.
    2. After the user has subscribed, I want to gather more information which needs to be added to the users profile.

    The form in my previous post is the header form, which is currently passing the "email" variable through to my Gravity form, where the user then fills out more info and then hits submit.

    The question I'm asking is how to I adjust my header / "quick subscribe" form to submit to a Gravity form (Stage 1), whilst still passing the email variable through to the next form, where more info is added, and the submitted (Stage 2).

    Does that make sense?

    Many thanks

    Posted 11 years ago on Tuesday August 7, 2012 | Permalink