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.

Help setting the default value on a custom pre-populated drop down field

  1. elawsoftware
    Member

    I need help setting the default value of a custom pre-populated drop down field based on the current URL.

    I have a custom drop down field with all of the states. If I'm in the Texas or California section of my site, I would like to set the state field to default to current state.

    My URL structure is setup as:

    /us/tx/ ...or... /us/ca/

    Basically I'm using the 2 letter state abbreviation for each state. I also have pages for each county within each state.

    I want to set the default field of a custom drop down based off of the URL. I have a page created for each state and I want the fiel

    Posted 13 years ago on Thursday May 20, 2010 | Permalink
  2. In order to do this you would need to be able to set a PHP variables to the State value. Because Gravity Forms does not use the abbreviation, you would need to take this a step further and be able to have a page variable that has the full State name.

    Once you can setup a variable that has the full State name you can then use PHP to pre-populate the State drop down field with the correct State.

    How comfortable are you with writing PHP? If you aren't very comfortable you may want to consider having someone assist you with this customization.

    Posted 13 years ago on Friday May 21, 2010 | Permalink