SOLVED

Re: Limit drop down options on form field

Go to solution
anastasia_32
Level 2

Limit drop down options on form field

My team is trying to have different drop down options on a form depending on whether or not an optional field was filled out on the same form. The idea is if, the person filled out a field then they get more options from the drop down. I am running into some issues with this as a conditional field value does not work here. Also, I am not sure I can use dynamic content here since I do not know where to add a tokenized button to track users. I am using Marketo landing pages and forms. 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Limit drop down options on form field

You can indeed do this using Visibility Rules.

 

Apply VRs to the Select based on the value of that optional field.

SanfordWhiteman_0-1622071555200.png

 

The key is that the Select's default value list needs to include all of the possible values. That list will never be shown, but it needs to be set up correctly. In this case it would have all 5 values:

Select...|
A|A
B|B
C|C
D|D

 

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Limit drop down options on form field

You can indeed do this using Visibility Rules.

 

Apply VRs to the Select based on the value of that optional field.

SanfordWhiteman_0-1622071555200.png

 

The key is that the Select's default value list needs to include all of the possible values. That list will never be shown, but it needs to be set up correctly. In this case it would have all 5 values:

Select...|
A|A
B|B
C|C
D|D

 

anastasia_32
Level 2

Re: Limit drop down options on form field

Thank you! This worked but now the situation has changed. Can I have a conditional on multiple fields? We want to show certain options if someone fills out their address but the address itself is a combination of individual fields: city, street address, etc. Therefore, the condition is more akin if A + B + C + D then show X instead of only If A show Y.

SanfordWhiteman
Level 10 - Community Moderator

Re: Limit drop down options on form field

Certainly can be done, but it needs a little Forms 2.0 JS.

 

Usually I create a custom field, or more than one, that can be reused for such purposes. Name is something like Form Visibility Management 01. 

 

That field is Hidden and manages visibility of other fields. Its value is the concatenation of several other fields, done w/JS.

SanfordWhiteman
Level 10 - Community Moderator

Re: Limit drop down options on form field


Also, I am not sure I can use dynamic content here since I do not know where to add a tokenized button to track users.

Unclear what you mean by this (tokenized button?). Dynamic content only applies if the Munchkin session is already associated, which wouldn't be the case if they're just now filling out the form.