Dynamic Options in Dropdown

By: Kevin Feenan | Asked: 09/13/2022
ForumsCategory: General questionsDynamic Options in Dropdown
Kevin Feenan asked 2 years ago
I need to be able to assign a dynamic number of options to a dropdown based on a conditional   For example If Field_1 EQ "value" then Field_2 Options = {1, 2, 4, 5, 10}  else Field_2 Options = {1, 2, 4, 6, 8}     Is there a way to do this without having to create multiple fields?  I need Field_2 for other conditionals later in the form
1 Answers
Bobby Clapp answered 2 years ago
Javascript is probably your best option. Add all the values you want and then create a condition to hide or show the appropriate select values. References: https://formidableforms.com/knowledgebase/javascript-examples/#kb-get-option-value-from-multiple-select-dropdown https://stackoverflow.com/questions/12111830/how-can-i-show-hide-options-in-a-select-when-another-option-is-selected

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community