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.

Populate dropdown field based on another long dropdown

  1. bonkey
    Member

    Apologies for a question maybe easy to answer with documentation, but as I'm a one-hour user I'd like to find at least some clues on what I should focus on to solve it.

    I've got a dropdown field with a quite long (about 40) elements to choose from and I'd like to have another which should have a closed list of elements (dropdown or multiple choice, doesn't matter) based on the choice from the first one. The latter makes the former more detailed (it's like choosing a brand and a model). All of them should be editable, so I'd rather put them into gravity forms in any way without doing any customized additions.

    I've already found I can prepare a single field for every choice from the first field and show them depending that choice, but it's rather uncomfortable because:
    1) It makes a form definition very long
    2) Gathered data will have unnecessary long list of fields to browse/export.
    3) I'd like to have more than one form which will use the list

    The only acceptable solution I invented so far is creating a supplementary form with all the brand-model definitions and adding some ajax to get the list for the second field. It still makes me do some additions, but looks the easiest.

    Could you provide me any other ideas for it?

    Posted 14 years ago on Sunday November 21, 2010 | Permalink
  2. Gravity Forms does not support dynamic drop downs where the values changed on previously selections. The only way to accomplish this is using Conditional Logic and creating fields for each variation. We plan on enhancing this in the future with more advanced capabilities, however currently this is the only way to accomplish what you are trying to do.

    Posted 14 years ago on Monday November 22, 2010 | Permalink
  3. bonkey
    Member

    Thanks. So, I'll do it with a customized ajax action. I hope there's no restrictions for it?

    Posted 14 years ago on Monday November 22, 2010 | Permalink
  4. I've noticed that when I enable values in a field, the conditional logic that uses this field doesn't work.

    Posted 14 years ago on Monday November 22, 2010 | Permalink
  5. Conditional logic should work with the value, however if you enabled values AFTER setting up conditional logic you may have to reset the conditional logic. But it should work based on the value. Try re-setting up the conditional logic and let me know if you still have a problem.

    Posted 14 years ago on Monday November 22, 2010 | Permalink
  6. I tried resetting the conditional logic, but it refuses to look at the values.

    Posted 14 years ago on Wednesday December 8, 2010 | Permalink
  7. @sanderdatema Can you Export your form using the Import/Export tool to Export the form to an XML data file and then post a link to that XML file here so we can download it and test with your form setup? Thanks.

    Posted 14 years ago on Wednesday December 8, 2010 | Permalink
  8. That file is here: http://j.mp/hxlUR9 The question is the one with Een, Twee, Drie, etc.
    And using the dynamic query is not working.
    A default option was selected by me. That works. I used 'onderwerp' as the parameter in the url. When using a non existing option, nothing happens and the default selection stays. However, when using an existing option, the whole questions is emptied, including the default option. So, something is evaluated, but the actions taken are wrong.

    Posted 14 years ago on Wednesday December 8, 2010 | Permalink