Conditional values in a ‘select’ field
-
Hi there and thanks for this great plugin,
I need to show different values in a ‘select’ field depending on a previous option selected. I’ve try three different approaches, but none of them meets my requirements.
Approach 1: It turns out that it does not show the drop-down menu and the first group does not appear in the “Show” field in the “Conditional fields” tab. I think there is a problem with the brackets.
[select * whatever [group group_A] "Option A1" "Option A2" [/group] [group group_B] "Option B1" "Option B2" [/group] ]Approach 2: In this case, the drop-down menu works fine, but then I use “Advanced CF7 DB” to store the information in a database and, as both ‘select’ fields use the same name (whatever), it always stores the information of the last one. It seems that “Advanced CF7 DB” does not understand the conditional logic.
[group group_A] [select * whatever "Option A1" "Option A2"] [/group] [group group_B] [select * whatever "Option B1" "Option B2"] [/group]Approach 3: This is a workaround, but I think it should be possible do it in a more efficient way. In this case, the information is correctly stored, but it also stores the default value of all the non-selected options.
[group group_A] [select * whatever_A "Option A1" "Option A2"] [/group] [group group_B] [select * whatever_B "Option B1" "Option B2"] [/group]Any ideas on how to implement conditional values in a ‘select’ field?
Thanks in advance for your help.
The topic ‘Conditional values in a ‘select’ field’ is closed to new replies.