How to create user input dependent form elements? I have created a form and it has multiple elements. Is there a way to show specific form elements depend on a slelect box selected value.
For an example my select box has 2 options. if i select option 1, form will show a text box after the select box. if the selected option is 2, form will show a another select box
after the first select box.
Yes it is possible and quite easy. Read up on the #states value in the drupal form api documentation. I am assuming this is for Drupal 7...