Forums

Conditional event on dropdown

driv 21 Apr, 2016
Hi,
I am trying to create a conditional event similar to the demo file.

demo-fields-events
Basic form with conditional fields, disable/enable fields based on user's choices.



So when a certain field (Other) is selected a text field appears.

I have tried copying the demo, but I'm not getting anywhere.

The text field I would like to appear is called 'role' and has a Field ID of 'role' and a Load state of 'parent hidden'.

Any thoughts on where I'm going wrong, please?
GreyHead 22 Apr, 2016
Hi driv,

That ll looks OK - are there any JavaScript errors on the form page that would stop the script working?
Please post a link to the form so I can take a quick look.

Bob
driv 22 Apr, 2016
Hi there, I have sent the link via PM.
Hope that's ok.🙂
GreyHead 22 Apr, 2016
Hi driv,

It's working now - the drop-down had no ID set so the JavaScript wasn't being created correctly (or at all). I added job_role in there and all is well. (There is no JavaScript for you to add - CF does that from the Events settings.)

Bob

PS I also moved the Please Choose option to the Empty Option box and removed a stray sub-label on the T&Cs checkbox.
driv 22 Apr, 2016
I spent quite a while trying, before asking for assistance - so your help is much appreciated.

Cheers!🙂
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger