Hello, 

I have a select element in web form. 

I also have a text field element in the same web form. Element name - Referred By. By default, this element is not visible unless this below condition is met. 

condition:

When I select Referral from the select list, I like to see the Referred By text field to display for me to enter data. 

https://drive.google.com/file/d/19EYWEnxo8y7_8vl9t6_x0K3OI-bjmUCZ/view?u...

How can I do it?

Comments

vm’s picture

under element is there an 'is' selection?

https://drupal.calpoly.edu/webform-conditional-example may aid.

drupol’s picture

I was expecting to see if then like the reference site. I see if but I do not see then

wombatbuddy’s picture

Looks like you forgot to select the state ("Visible" in your case). See the screenshot: https://ibb.co/Fnmswkj

drupol’s picture

After I selected "visible", "how did you hear about us" element does not display in UI.  UI will need to display "how did you hear about us" element without any condition.

Also your screen print does not show how you displaying "referred by" element when condition is met. 

How can I say if "referral" was selected from "how did you hear about us" select list then display "referred by" element? I see your if statement but I do not see then statement. 

drupol’s picture

I added the conditional logic to "How did you hear about us" element. 

Instead, I needed to add the logic to "Referred by" element. It works now. 

Thanks!