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

@Oneng: It looks like comment body is wrapped with other elements and needs some special handling. To determine this, you will need to use dsm or some other method of debugging to view the form array for that field.

In my testing, I found that the proper syntax for comment body is this:

$form['comment_body'][$form['comment_body']['#language']][0]['#attributes']['placeholder'] = t('YOUR TEXT');

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.