Default for required Drop-down

Permalink Browser Info Environment
I have a drop-down list that is required but does not have a default value, and I don't want a default value.

For example, my example, I need users to select a company name from a pre-populated drop-down list of company names. This is required.

I do not want to have any company name in there by default so that a user does not submit a form without intentionally selecting one of the options. When I leave the default box blank in the drop-down list settings, it fills in the first entry in the drop-down list.

Ideally I would want something like -----Select Company-----, but I suspect you would have to program it as a default something that did not qualify as a selection when a user submits the form, so either blank or -----Select----- or allowing me as site admin to enter a value to be displayed by default as in indicator to select, but that would not qualify as a selection if the form was submitted.

Thanks so much,

Type: Discussion
Status: New
uswebdesigner
View Replies: View Best Answer
jgarcia replied on at Permalink Best Answer Reply
jgarcia
What if I changed it to do this: If a dropdown field is set to required, the first option is just blank, and they must select a non-blank option before the user can submit the form. Would that solution work for you?
uswebdesigner replied on at Permalink Reply
uswebdesigner
That would do the job. I can't seem to put my mind on what I normally see with regard to having something in there like ----Select an Option--- that is generic enough to work for anyone, short enough in length to not be a problem... Seems that would be better than blank, but blank may be a safer option for anyone and perhaps there is a programming reason to have it as such.

Anyways - yes, thanks so much. That would be great.

peace,
hursey013 replied on at Permalink Reply
hursey013
Has there been any progress on this? I am having a similar issues with drop downs. By default there is no blank or "null" option, so when you submit a record that doesn't require an answer in the drop down its still going to record whatever is showing up in the box by default. Any suggestions on how I can go about submitting a null answer?
jgarcia replied on at Permalink Reply
jgarcia
Yep. New version posted today (1.4). Dropdown box now shows blank option first when set to required.
hursey013 replied on at Permalink Reply
hursey013
Does it show a blank first row if it is not explicitly marked as required as well?
jgarcia replied on at Permalink Reply
jgarcia
No
hursey013 replied on at Permalink Reply
hursey013
Here's my issue. I have a drop down with several values, its not required though, but since there is no blank space in the top, anytime someone submits the form rather than not entering in any data for that field, it inputs whatever is showing in the drop down (even though the person never touched it or selected it). Is it possible to have all drop downs regardless of required or not show a blank first line?
uswebdesigner replied on at Permalink Reply
uswebdesigner
Since I am also monitoring this series - here is a thought given the emerging diverse needs. Maybe there could be a checkbox that when checked for that field type, and any other related ones, would leave the default field blank. Another would potentially just leave it blank always given that built into your interface already is a field to allow developers to specify a default value.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.