Error when using hook_form_comment_form_alter() I am using the following function in template.php to modify the comment form to remove the form title and add a default value inside the form:

/**
* Implements hook_form_comment_form_alter().
*/
function mytheme_form_comment_form_alter(&amp;$form, &amp;$form_state, $form_id) {

    $form['subject'] = array(
      '#type' =&gt; 'textfield',
      '#maxlength' =&gt; 255,
      '#attributes' =&gt;array('placeholder' =&gt; t('subject')),
      '#required' =&gt; FALSE,
    );

    $form['comment_body'] = array(
      '#type' =&gt; 'textarea',
      '#maxlength' =&gt; 255,
      '#attributes' =&gt;array('placeholder' =&gt; t('comment')),
      '#required' =&gt; TRUE,
    );

}


It does the desired task but it causes an error where the form will submit but the contents entered into the body are not submitted and will not display. The following error gets generated:

Notice: Undefined property: stdClass::$comment_body in comment_submit()


Am I missing something within the function so the text inputed is actually submitted when saving the form?
Turns out the correct way to add the placeholder was:

$form['comment_body'][LANGUAGE_NONE][0]['#attributes']['placeholder'] = t( 'comment' );