$select
will show an empty choice if the contents of the existing field does not match one of the options. You could write “Six” into mychoice
and would get the same result. The default attribute only guards against missing fields / tiddlers. As it says so in the docs, it’s probably by design.
You could make the empty field one of the options and have the $select
show arbitrary text for it:
<$select tiddler="stemp" field="mychoice " default="One">
<option disabled value="">The field is empty.</option>
<$list filter="One Two Three Four Five" >
<option value=<<currentTiddler>>><$view field="title" /></option>
</$list>
</$select>
I can’t tell if this would be of any use in your scenario. Whereever you actually use the value of mychoice
, you’d have to decide what to do with an empty field, too. The selection “The field is empty.” is purely a visual hint for the user, the actual value remains an empty string (that you could check for with is[blank]
).
Have a nice day
Yaisog
PS: There is an error in the docs. In example “Simple List with Placeholder Value” it says “Note that the targeted field must be empty, or not exist, for the placeholder to show in the widget”, which, as one can easily test oneself, is not the case.