HackGT / registration

Powerful and extensible registration system for hackathons and other large events
https://registration.hack.gt
MIT License
6 stars 1 forks source link

Force users to choose an option for <select> dropdowns #261

Closed petschekr closed 5 years ago

petschekr commented 5 years ago

Currently, the first choice is automatically selected by the user's browser. This PR adds a "Please select" option to the list which is selected by default but is marked with the disabled attribute (which browsers don't send along upon submission). The server side code will then catch this missing question and either mark the value as null (if the question is optional) or display an error to the client telling them which question they left blank.

In action

This PR also:

hackgbot commented 5 years ago

Hey y'all! A deployment of this PR can be found here: https://registration-fix-drop-downs.pr.hack.gt

joel99 commented 5 years ago

Do we need to update questions.json to drop please select, otherwise lgtm

petschekr commented 5 years ago

@joel99 Yeah we have to remove the explicit "Please select" option from the Catalyst questions