Posted: October 27, 2016 at 11:01 am
|
Is it possible to add an “Other” option in a dropdown that would produce a textbox? |
Hi there, Currently that’s not something we have within EE so it would require custom development. We do have plans to add some ‘conditional logic’ to the forms used within EE and have that on our roadmap here: https://trello.com/c/vEShUtBA/24-add-on-conditional-logic-registration-forms However note that feature is a request and not currently under planning/development so will not be available ‘soon’. |
|
|
Tony, I am very surprised that this is not in development. This feature is very common on forms. |
There are more than a few reasons why it’s not in development. One being it’s not as popular as a request as some of the other requests we get, and another being it’s going to require completely refactoring the current codebase for setting up registration questions in the admin, as well as the registration forms on the front end. Thirdly, a one-off solution using a tiny bit of jQuery makes it possible to add some conditional logic functionality to your EE reg forms. I can work up a simple example for you. May I ask is this for EE4 or EE3? |
|
|
EE3 |
Here’s some example code you can use/adapt: You can add the above to a functions plugin or into your WordPress theme’s functions.php file. |
|
|
Josh, Where do I get the ID from? |
You can get the ID by going to Event Espresso > Questions, then click on the Edit link for that question. Then you look at the browser’s URL bar and you’ll see the URL of that page. The ID will be at the end of the URL. |
|
|
Got it, Thanks. Can I use the code you supplied for multiple questions that have the “other” option on the same form? |
You can. You’ll need to set up one “Other” text field for each drop down question, then you copy and adapt the main part of the code that does the hiding/showing (lines 11-17). |
|
|
ok |
The support post ‘Add "Other" to dropdown’ 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.