Support

Home Forums Event Espresso Premium Default to blank or"please select" answer for dropdown question

Default to blank or"please select" answer for dropdown question

Posted: December 19, 2016 at 10:41 am

Viewing 4 reply threads


Matt

December 19, 2016 at 10:41 am

I would like to use the dropdown questions within a registration form, but it seems like it defaults to the first answer that I input on the list.

This is a problem as I think its easy to miss and people could end up registering with incorrect answers.

Is it possible to have something that I see on my online forms where the default answer is “Please Select” and if the user does not select an answer it flags it up when they try to register?


Josh

  • Support Staff

December 19, 2016 at 11:46 am

Yes, this is possible in the current version of EE4, (although setting this up is a bit glitchy due to some bugs in the form editor that are currently being worked on). Here’s how you set up a blank/Please Select answer for a drop down question:

1) Create a new drop down question, and leave the first answer Value field blank, and input “Please Select” for the first answer’s description field.
2) Add the other answer fields, set question to required.
3) Save.
4) You’ll find that “Please Select” is copied over to the value field. This is a bug that will be fixed in an upcoming version of EE. For now, delete that copied over text from the first answer field, then save.

Step 4 will no longer be necessary after the bug is fixed.


Matt

December 19, 2016 at 1:16 pm

Thanks, that appears to work.
Although this is a minor problem, is there any way it can show an error message, or automatically scroll to the question that prevents the form being completed?

At present, clicking “Confirm & Pay” it seems to sit in the same location on the page and while it does show “This is a required field” you have to scroll up to see it.


Josh

  • Support Staff

December 19, 2016 at 3:39 pm

You can try testing this code out for scrolling to the invalid form field:

https://gist.github.com/joshfeck/1bd963bbfde7e8b07b2ec118b1a31613


Matt

December 19, 2016 at 3:51 pm

Thanks.

Viewing 4 reply threads

The support post ‘Default to blank or"please select" answer for dropdown question’ 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