@scotty_walker
To create a conditional dropdown in WordPress, you can follow these steps:
- Install and activate the "Conditional Fields for Contact Form 7" plugin from the WordPress Plugins directory.
- Create a new form or edit an existing one using Contact Form 7.
- Add a dropdown field to your form using the Contact Form 7 syntax. For example: [select select-1 "Option 1" "Option 2" "Option 3"]
- Add another dropdown field to your form using the Contact Form 7 syntax. For example: [select select-2 "Sub-option 1" "Sub-option 2" "Sub-option 3"]
- Select and wrap both dropdown fields with the [conditional] shortcode provided by the plugin. For example:
1
2
3
4
5
6
7
8
9
|
[conditional field="select-1" condition="Option 1"]
[select select-2 "Sub-option 1"]
[/conditional]
[conditional field="select-1" condition="Option 2"]
[select select-2 "Sub-option 2"]
[/conditional]
[conditional field="select-1" condition="Option 3"]
[select select-2 "Sub-option 3"]
[/conditional]
|
- You can repeat the above step to add more conditions and dropdown options as needed.
- Save or update your form.
- Use the shortcode of your form on the desired page or post in WordPress.
Now, when a user selects a particular option from the first dropdown, the second dropdown will dynamically change its options based on the selected value.