By halloffame on
I want to add a
label for a select list of a CCK text field. What I did was add
as one of the pre-defined values in the select list and set it as its default. However, this field is a required field and when the default value is left as is it recognizes the default value to be valid and therefore being accepted. What I want to do is to set the
as a label of that field that appears in the dropdown together with the pre-defined values but I don't want it to be selectable value and posters still need to choose one from the dropdown menu. How will I be able to do this? Thanks.
Comments
For some strange reason I
I can't edit my post above. My post appeared kinda weird because of the
<>. Here is it again....I want to add a 'please choose' label for a select list of a CCK text field. What I did was add 'please choose' as one of the pre-defined values in the select list and set it as its default. However, this field is a required field and when the default value is left as is it recognizes the default value to be valid and therefore being accepted. What I want to do is to set the 'please choose' as a label of that field that appears in the dropdown together with the pre-defined values but I don't want it to be selectable value and posters still need to choose one from the dropdown menu. How will I be able to do this? Thanks.
Guys please anyone?
Guys please anyone?
...
(I had the impression I already answered that question. Maybe it's a duplicate.)
Type "|please choose" instead of "please choose". To the left of the 'pipe' is the value itself (there's help beneath that box explaining this), and in this case we make it an empty string, so Drupal will bark "this field is required!".
I came across this somewhere
Add as you're first item in the list:
|-Please Choose-
This will be the default choice but will return an error ( because of the '|' PIPE character) telling the user to Choose an item from the dropdown. The PIPE character does not show in the selection list.
This will only work if you created a selection list with CCK and not with Profile in core.
Eduardo
Doing same with non-cck selection lists - core profile
Is anyone aware of a solution to this for non-cck fields? I tried in the forums but I couldn't see anyone for miles and miles :(
Any guidance appreciated.
For Taxonomy terms?
How can I do the same for taxonomy terms?
I put " |--please choose " but it's just regards as one of the terms.