1

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.

1
1

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...

1

http://www.deckfifty.com/blog/2012-11/drupal-form-api-conditional-fields this link has the answer i want

0

Assuming you created the form or fields using webform builder, you can use the conditional_fields module which is quite easy to configure and very flexible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.