diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-04-30 21:59:29 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-04-30 21:59:29 -0700 |
commit | 471664d00e278c340208821aa5f789b0bfbdaf8f (patch) | |
tree | 01d62b7e5d5223beec9cfff5baa3c1d828fb380b /modules/profile | |
parent | 6adf8ca0c26a9bc2c6cdc88be89974f7d8d096ad (diff) | |
download | brdo-471664d00e278c340208821aa5f789b0bfbdaf8f.tar.gz brdo-471664d00e278c340208821aa5f789b0bfbdaf8f.tar.bz2 |
Issue #285232 by ralessi, sun, catch: Add 'please select' item to required select list item.
Diffstat (limited to 'modules/profile')
-rw-r--r-- | modules/profile/profile.module | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module index a7ce0116c..6b00d4296 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -435,7 +435,7 @@ function profile_form_alter(&$form, &$form_state, $form_id) { break; case 'selection': - $options = $field->required ? array() : array('--'); + $options = array(); $lines = preg_split("/[\n\r]/", $field->options); foreach ($lines as $line) { if ($line = trim($line)) { @@ -449,6 +449,7 @@ function profile_form_alter(&$form, &$form_state, $form_id) { '#options' => $options, '#description' => _profile_form_explanation($field), '#required' => $field->required, + '#empty_value' => 0, ); break; |