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.

Dynamically change dropdown

  1. I'd like to dynamically change the options in dropdown (B) based on the selected option in dropdown (A).

    E.g. If I select "Jeep" in dropdown (A), the options in (B) become "Cherokee", "Grand Cherokee", "CJ-7"; if I select "Toyota" in (A), the options change to "Camry", "RAV4", "Prius". Etc.

    I know it's possible to dynamically populate a dropdown on load, but is it possible to do so asynchronously after the form has loaded?

    Thanks.

    Posted 6 years ago on Monday April 15, 2013 | Permalink
  2. You're looking for what is sometimes called "dependent dropdowns". That is not a feature of Gravity Forms. Here is one user's solution to the problem: http://www.gravityhelp.com/forums/topic/dynamic-ajax-category-child-dropdown#post-60436

    Posted 6 years ago on Thursday April 18, 2013 | Permalink
  3. Thanks. Looks like that link only works for paying customers. Not quite sure why the forums are protected this way. Ah well.

    Understood it's not an out of the box feature, but as long as I can get there with some Javascript I'm okay.

    Wouldn't need to resort to XMLHttpRequest if we could load *all* options in the second dropdown and dynamically hide/unhide individual options.

    Another approach is create individual dropdowns for each sub-option (one for Toyota models, one for Jeep models, etc.) and use conditional logic to hide and unhide the dropdowns as necessary. This tends to get unwieldy, especially after more than two tiers of logic.

    Posted 6 years ago on Thursday April 18, 2013 | Permalink

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