1

I have created a web form in drupal 7, i have one select option with two values and one input text box. When i click on one value input text box should appear nothing so that anybody can write some text but when i click on 2'nd value, input text box should appear 6 drop-down values

How i can achieve this?

Below is sample image

0

2 Answers 2

2

Go to Modules > Webform and see what version it is. If it is version 4+, as RoloDMonkey has mentioned, than conditionals are built in. If your Webform module isn't 4.x then I suggest updating it so that you can use this feature.

  1. Go to Content and find your webform and open it.
  2. Click "Webform" tab
  3. Click "Conditionals" link
  4. Click the (+) button
  5. Implement the logic:

    • If "[select question that has the conditional answers]" is "[select name of answer that opens the textbox]" then "[name of textbox]" is shown

    • If "[select question that has the conditional answers]" is "[select name of answer that opens the selection menu]" then "[name of selection box]" is shown.

Make sure you have all possible options set up already in the webform before applying the conditionals.

Here is a demo someone built using Webform Conditionals: http://www.sixmiletech.com/node/15

0
1

Look into the Webform Conditional module. There's a demo here https://www.youtube.com/watch?v=7uxfqJr6K6U.

3
  • 1
    Same page conditionals are built in to Webform 4+. Commented Jun 4, 2015 at 14:29
  • I suggest making your own answer @RoloDMonkey so it can be upvoted and accepted (and perhaps add some further details to the answer like a simple walkthru)
    – tenken
    Commented Jun 4, 2015 at 16:18
  • Sorry guys, I am not satisfied by your solutions. Can you please guide me step by step as my question is clear.
    – Shsh
    Commented Jun 5, 2015 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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