In Drupal 6, by default, a required CCK field will display the first allowed value.
I want it displays "- Please Select -": Is there an easy way to do this?

I do not want to save "- Please Select -" in the database.

4 Answers 4


Use the key|label format for allowed values:

|-Please Select -

By making the key for "-Please Select -" an empty string, the form can't be submitted with this value.

  • This should work if the field is required.
    – googletorp
    Commented Aug 12, 2011 at 21:29
  • This worked amazingly!
    – iStryker
    Commented Aug 12, 2011 at 23:07

In the list of options of global settings of field you can put in first place the option - Please Select - :

-Please Select -

Save the field.

After in the field settings you choose - Please Select - in default value of the field.

Finally you save the configuration of field.

  • I thought of this, however I do not want - Please Select - be saved to the database
    – iStryker
    Commented Aug 12, 2011 at 20:11

Put your field as not required and then in a hook_nodeapi() check that the user has effectively selected a value:

function custom_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if ($op == 'validate') {
      if ($node->field_select[0]['value'] == '') {
        form_set_error('field_select', t('Please select a value.'));

seems like AHAH can do the job to populate select list or add items: AHAH - populating a select (list) with a select (drop-down).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.