Skip to main content

form api

Multi-dependent select elements in Drupal 7 using ajax

Recently I needed to modify a Drupal 7 node form to have two drop down select elements populate based upon a third select element's choice. I have altered select elements in the past to have a single dependency, but never have I made one element control the content of two different elements.

To start, I made the first element control the second (the old familiar way):

I need the selection in field_dropdown_1 to dictate what appears in the list for field_dropdown_2 and field_dropdown_3.