Submitted by Jonathan Dale on Mon, 06/03/2013 - 9:03am

@Oneng: You will likely want to use hook_form_comment_form_alter instead.

Something like the following should work:

function ahb_form_comment_form_alter(&$form, &$form_state) {
if (isset($form['name'])) {
$form['name']['#attributes']['placeholder'] = t('enter your name');
}
}

The content of this field is kept private and will not be shown publicly.

Plain text

  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.