Hi, how i can set conditional dropdown in CF7?
my form : https://prnt.sc/vc2rh6
i want show different values in dropdown 2 based on selected value in dropdown 1.
Thanks
my form : https://prnt.sc/vc2rh6
i want show different values in dropdown 2 based on selected value in dropdown 1.
Thanks
Did you check the demo form available om this feature ? New form > Demo forms > Connected Dropdowns demo
Hi, but this demo is load valuest from database but i want my option from dropwdown.
thnaks
thnaks
So your options are a fixed list, not from a Database table ?
Hi Roman,
it works like the database, but instead of using a "Read Data" action, you will need to use either 1 PHP action or multiple "Variables" actions, the PHP should check the value passed from the first dropdown and return an array of values, then use {var:php_name} as the data source of the "Dynamic options" setting in the 2nd dropdown!
here is an example return value to be used as the data source
it works like the database, but instead of using a "Read Data" action, you will need to use either 1 PHP action or multiple "Variables" actions, the PHP should check the value passed from the first dropdown and return an array of values, then use {var:php_name} as the data source of the "Dynamic options" setting in the 2nd dropdown!
here is an example return value to be used as the data source
return [
["text" => "option 1", "value" => "op1"],["text" => "option 2", "value" => "op2"]
];
Hi, Max.
Thnaks. But i dont know how work it. I have demo Dynamic option dropdown.
In action view i add php : https://prnt.sc/vtrqnc
but in dropdown dynamic data i dont select this php . https://prnt.sc/vtrr6k
can you help me a little more detailed
thanks
Thnaks. But i dont know how work it. I have demo Dynamic option dropdown.
In action view i add php : https://prnt.sc/vtrqnc
but in dropdown dynamic data i dont select this php . https://prnt.sc/vtrr6k
can you help me a little more detailed
thanks
the PHP action will not be selectable in the source list in the dropdown settings, just type it instead of selecting:
{var:php_4}
Many thanks its work .
I have one question how i add condition for selected value from first dropdown . thank
I have one question how i add condition for selected value from first dropdown . thank
You need to login to be able to post a reply.