Posted: November 6, 2018 at 8:43 am
|
Hello Team – I attempted to follow the post regarding hiding questions based upon previous question on Registration form and failed miserably. Basically I have TWO Dropdowns, ID 13 and ID 14. IF ID 13 Dropdown is changed from No To YES, I want to SHOW ID 14 etc. I am using EE4 and latest updates. I know I need to add a Function/Snippet but am a tiny bit ignorant as to how the JQUERY is done etc. |
Hi, Can you post a link to an event on your site that uses the custom registration form so we can take a look at what’s going on there? |
|
|
https://training.paulmitchell.edu/eventinfo/texture/ Start Registration, then on the Form the question is: Thanks Josh! |
Hi, I checked the registration form and I don’t see the custom script loading anywhere. Has that been removed? If it has been removed, can you share the code you’re working with into a PasteBin or GitHub Gist, then share that link here? |
|
|
Hi Josh – This is the code and obviously not working/correct. //* Please do NOT include the opening php tag, except of course if you’re starting with a blank file |
For EE4 you can follow this example instead: https://gist.github.com/joshfeck/183209d5239cc07ec94f9ebbfb017d40#file-functions-php In that example you’ll note that it’s adding to a different script (one that’s actually used in EE4) and that it’s using classes for selectors instead of IDs. |
|
|
Hi Josh – Thanks for your help this worked great. /* Please do NOT include the opening php tag, except of course if you’re starting with a blank file To hide or Show an Entire Question (Conditional Logic) follow these steps: 1. Build Questions In EE4 Registration Forms. */ function ee_custom_show_question_conditionally() { |
Thanks for sharing. Usually it’s best to post larger blocks of code into a PasteBin or GitHub gist to preserve the code format (especially important since single and double quotes get transformed into curly quotes by the forum software) Also, you’ll note you can get the ID of the questions from viewing the list table in Event Espresso > Registration Form > Questions. |
|
|
Hopefully this is cleaner |
The support post ‘JQuery Snippet to Hide Question Based upon Logic’ 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.