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.

Conditional Logic with Hundreds of Options

  1. I have a form which shows a different image / HTML block depending on what zip code is entered in a field. If the zip code is none of over 500 variations it shows another image. Right now I'm setting up the conditional logic option to "Hide" that image if any of the 500+ zip codes are entered. This is taking for ever to enter in and makes the form load more slowly.

    Is there an easier way?

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  2. David Peralty

    The only other way would be to write your own custom AJAX to do what you want, as it would be much faster than using our conditional logic system to hide so many elements.

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  3. Example?

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  4. It's not hiding 500+ elements.
    It's hiding one element based on 500+ possible variables.

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  5. David Peralty

    Sorry, custom JavaScript isn't one of the skills I posses. And in knowing that you are hiding one element based on 500 conditions, I don't think there would be any JavaScript that could speed that up unless you were using a simple range (i.e. show only if user input not between 90000 and 99999)

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  6. Zamir
    Member

    I am making a form that is using conditional logic, and using drop-downs like:
    * -- Select City --
    -- and when a city is selected then a ~50-70 locations of that city drop-down shows up.
    -- there are ~200 cites, and each city containing ~50-70 locations

    Then same form has something like:
    * -- Select Maker --
    -- user selects from drop-down HP, Dell, Sony, Acer, Asus etc,
    -- and depending on the selected company, say Dell, a hidden drop-down shows up with something like Latitude, Inspiron, etc
    -- then depending on the selected model, another drop-down shows up with all versions for Latitude

    Now if I look at the source code of the loaded form, there is a ton of HTML code with ALL the list items loading. There is a display: none property set, but otherwise the whole code will ALL the cities, all the city locations, all the companies all the models, all the versions everything is being loaded. This is making the form page load time slow.

    Is there a way to load only the relevant conditional items depending on the parent item selected?

    Like Latitude, Inspiron etc should only load if Dell is selected and so on.

    I _have_ to put all the options in a drop-down because I don't want user typing these things and making typing mistakes... that would mess with the search results later on.

    Kindly reply.

    Posted 11 years ago on Monday June 17, 2013 | Permalink
  7. David Peralty

    You would have to custom code your own AJAX to do this, as it is beyond the abilities of Gravity Forms out of the box.

    Posted 11 years ago on Monday June 17, 2013 | Permalink