Error message

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

Hide Formatting Guidelines on Drupal's Comment Form

Category: 

Need to hide the formatting guidelines and description that show up by default on Drupal's comment form? Try something like this:

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case "comment_form":
      // begin: hide 'filtered html' input format guidelines and description
      unset($form['comment_filter']['format']['format']['guidelines']['#value']);
      unset($form['comment_filter']['format'][2]['#value']);
      // end
    break;
  }
}

Add new comment