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.

Pre fill a field with GET parameter

  1. ronaldus
    Member

    Hi dear people from Gravity.
    I'd like to automaticly fill the form fields Domeinnaam and Domeinextensie with the data people fill in in my WHOIS form (Tribulant plugin) which is on this page:
    http://www.webzenz.nl/domeinnaam/.
    The filled in data are put in the URL of the next page: http://www.webzenz.nl/bestellen/?domain=kkjfhdfjghjk&tld=nl
    So I thought I have to put GET{domain} and GET{tld} in the field Permit this field to be filled dynamicly in the GravityForms backend?
    The {domain} and {tld} are passed as GET parameters in the URL so they can be accessed with GET. But how to do this?
    Sorry, I'm a newbie with this...
    Thx and kind regards,
    Ronaldus

    Posted 13 years ago on Tuesday February 8, 2011 | Permalink
  2. You are close, but you aren't setting the parameter names correct. I will use domain as an example.

    - Edit your form
    - Edit the field you want to populate with the domain value
    - Select the Advanced tab
    - Check the "Allow field to be populated dynamically" checkbox
    - In the parameter name enter "domain" without quotes
    - Save your form

    Now to pass the domain value to the form you would pass ?domain=XXXX in the query string. The parameter name is what is used in the query string, in this example it was "domain" so to pre-populate it via the query string you would pass ?domain= in the query string.

    You would do the same for TLD.

    - Edit your form
    - Edit the field you want to populate with the TLD value
    - Select the Advanced tab
    - Check the "Allow field to be populated dynamically" checkbox
    - In the parameter name enter "tld" without quotes
    - Save your form

    Now pass the TLD value to the form by pass ?tld= in the query string. So if you do all of the steps above you would populate both like this:

    http://mydomain.com//mypage/?domain=XXXX&tld=XXXX

    Keep things case sensitive, so if you give it a parameter name of "domain" (all lowercase) then you need to pass it as ?domain= (all lowercase).

    Posted 13 years ago on Tuesday February 8, 2011 | Permalink
  3. ronaldus
    Member

    Well, that was simple...
    It works now!
    Thx for your reply Carl!

    Kind regards,
    Ronaldus

    Posted 13 years ago on Wednesday February 9, 2011 | Permalink