According to the webform handbook: "...if the default option is left blank, an option for "- Please select -" will be added automatically for non-required fields and "- Select an option -" for required field."

I have a webform set up with several drop down lists of options (e.g. one that lets a user select Mr., Mrs., Ms., Miss, etc.), and none selected as default. Regardless of whether or not the field is set to be required, the field always displays the first option (Mr.) as the default.

Comments

dejavu1987’s picture

I m having the same problem.
Using the same version of Webform (v 7.x-3.11).
It works fine in v 7.x-3.9

colemanw’s picture

Same here. It seems to be working fine in the 6.x branch, but not in 7.x.

colemanw’s picture

Title: Select list always defaults to first item in option list » "- Please select -" Is not prepended to option lists
Priority: Normal » Major

Aside from being broken, I think this logic (as you quoted from the handbook) is a bit off. The addition of "- Please select -" to dropdown lists should not only be dependent on the presence of a default value, but should also be governed by whether or not a field is required. Non-required fields, even if they have a default set, ought to get the "- Please select -", since that's the only way a user can not select an option (and since it's not required, they shouldn't have to).

robokev’s picture

Ideally, you should also be able to specify (override) the prompt that is used. In my case, I want my form to be bilingual since it will be used by both English and French speakers. Therefore, I'd like to override the mandatory "- Select an option -" with something like "- Select / sélectionnez -".

quicksketch’s picture

Status: Active » Closed (duplicate)
robokev’s picture

Pleased to see this has been resolved in latest version 7.x-3.13. Many thanks!