Conditional Dropdown Boxes

Learn how to conditionally filter a lower level dropdown box such as position or city, by a higher level category such as department or region, using Corvid (a.k.a. Wix Code). This is useful for breaking down lower level dropdown boxes with many options into fewer options while maintaining granularity.

This example uses department and position (i.e. jobs or roles) data from the #Employee collection to create the options in each downdown. For more information on how to filter a repeater using dropdown boxes in general, please refer to this page. The position dropdown box (#iptConditional) is conditionally filtered on the selection from the department dropdown box (#iptRegular) since there are many positions within each department. All positions are available for selection when no department is selected. Try the example below.

#iptRegular
arrow&v
arrow&v
#iptConditional
Please wait ...
Disclaimer: To the best of our knowledge, this code works for its stipulated purpose. If you find an error in our code, or know of a better way to achieve the same result - please contact us! All our code snippets come with full support to help you implement them on your own website - simply contact us for help.
  • Facebook Social Icon
© CorvidCodeBank