Support

Home Forums Event Espresso Premium Dropdown questions

Dropdown questions

Posted: November 2, 2016 at 5:13 am


kemst

November 2, 2016 at 5:13 am

Hi

I have a lots of dropdown questions in my form and it makes the form look ugly. I would like to be able to make some of them hidden based on what you choose in some of my dropdown questions. Here is an example:

dropdown 1: choose a transport
helecopter
plane
car
boat
then if you choose like for instance “car” you would see a dropdown for carmodel
dropdown-carmodel: choose a model of car
ford
kia
toyota
porche

you will not see the dropdon-plane because you choose car in dropdown 1

Is this possible?

Regards,
Runar Sigurdsson


Josh

  • Support Staff

November 2, 2016 at 1:02 pm

Hi Runar,

This is possible but it does require a bit of JavaScript programming to make that customization happen. Are you or is someone on your team able to follow an example of how to hide/show form inputs based on another form input selection?


kemst

November 3, 2016 at 3:07 am

Hi and thank you so much for your fast reply. Yes a am a decent JavaScript programmer and I do program in php also. One thing I would be afraid off is if my code gets overwritten during updates. And I would need to know where it would be safe to add the extra code.

With thanks in advance,
Runar Sigurdsson


kemst

November 4, 2016 at 7:57 am

I did try to hide the element or the div with the question but my query did not find the id.

this here is the basic query to do this. Why does it not find the id?

document.getElementById(‘ee_reg_qstn-452-12-input-dv’).style.display = ‘none’;


Josh

  • Support Staff

November 4, 2016 at 10:59 am

Hi there,

You can use the class instead of the ID. Here’s a readymade code example that you can get started with:

https://gist.github.com/joshfeck/183209d5239cc07ec94f9ebbfb017d40

The support post ‘Dropdown questions’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso