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.

Get field parameters from previous step

  1. I have a form that splits in 2 directions. In a first step drop-down with options Buy or Sell. Based upon which option is selected in the first step in second step have to fill different input fields which had conditional logic. In confirmation message should put 2 different images depending on which option is selected: buy or sell. Is there any way to make check which option was chosen in first step? I was trying with hidden fields but did not helped. I tried to take a get URL parameters from the previous step but also did not helped. Is there any way to use two images in different Confirmation messages?

    Posted 12 years ago on Thursday July 7, 2011 | Permalink
  2. Gravity Forms doesn't support conditional confirmation messages. So the only way you could do this is by creating a custom confirmation page and passing field values to it via the query string and then showing those values on your custom confirmation page by getting them from the query string and displaying them.

    Posted 12 years ago on Thursday July 7, 2011 | Permalink
  3. I don't understand how to do the query strings. Can someone explain?

    Posted 12 years ago on Thursday July 14, 2011 | Permalink
  4. To configure your form so it uses a redirect for it's confirmation and passes form field values to the URL it is redirecting to you would:

    - Edit your form
    - Edit the Form Settings
    - Select the Confirmation tab
    - Choose "Redirect" for the confirmation message
    - Enter the full HTTP URL to your custom PHP page
    - Check the "Pass field data via Query String" checkbox
    - Build your query string using the "Insert form field" drop down to insert merge tags for the field values

    Here is an example:

    http://i.imgur.com/5HUlC.png

    Now when that confirmation is executed it's going to pass the user to that HTTP URL along with the query string you configured. For example mine would have redirected to:

    http://www.mydomain.com/my-page.php?firstname=John&lastname=Doe&email=john@doe.com

    Your custom PHP page would then need to read the query string values and then redirect appropriately based on the information passed to it.

    Posted 12 years ago on Thursday July 14, 2011 | Permalink
  5. Thanks for your response. So how do I set it up so that the second page can read the query string?

    Posted 12 years ago on Thursday July 14, 2011 | Permalink
  6. I think I figured it out, I just typed feature into the parameter name. Feature is what is used on Form 1 and I had to add feature= and then the string.

    Posted 12 years ago on Thursday July 14, 2011 | Permalink
  7. Carl, what do those numbers 2.3 in your example mean? firstname={name(First):2.3}

    Also, I have two fields I want to query over. The are both drop down lists. One has 36 choices and the other has 5.

    So how do I set up the Pass Field Data Via Query String so that I cover every single combination of choices? Is that related to the numbers used?

    Posted 12 years ago on Thursday July 14, 2011 | Permalink
  8. One more question, can I lock the populated field so that the user cannot change what he already answered in Form 1?

    Posted 12 years ago on Thursday July 14, 2011 | Permalink
  9. The number correspond to the field id. You shouldn't change them. They are dynamic. They are generated when you use the "Insert form field" drop down to insert the merge tag. You don't edit the merge tag. The merge tags are for the field and they output the value of that field.

    Posted 12 years ago on Thursday July 14, 2011 | Permalink

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