Skip to content

Instantly share code, notes, and snippets.

@keeprock
Created February 27, 2015 12:29
Show Gist options
  • Save keeprock/078811395e1ac01dd7dd to your computer and use it in GitHub Desktop.
Save keeprock/078811395e1ac01dd7dd to your computer and use it in GitHub Desktop.
Adding placeholder for empty select box
function custom_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'WEBFORM_ID') {
$form['submitted']['WEBFORM_FIELD_NAME']['#empty_option'] = 'TEXT';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment