Webform Change default select list label with empty value

Public

Webform select list default label is something like --Select-- you can change this with this code in hook_form_alter

</> CopyGet raw version
php
  1. if ($form_id == 'webform_client_form_YOUR_FORM_ID') {
  2. // YOUR_FORM_ID IS your webform node id
  3. $form['submitted']['<your select field>']['#empty_value'] = '';
  4. $form['submitted']['<your select field>']['#empty_option'] = t('Whatever new value');
  5. }