How to hide the "help-block" on an Image field in the Comment Form I have added an image field to the comments.

This allows to my visitors to add images with a comment.

But I have annoying "help-block" for the image field in the form of adding a comment.



How to gracefully to remove this stuff?
Drupal 7

I done it through the node_view_alter hook and my custom theme.

In the theme's template.php file I added the following function

function MyThemeName_node_view_alter(&amp;$build) {
  if ($build['#node']-&gt;type !== 'My_Node_Type'){
    return;
  }

  // Your image field can not exist while saving comment.
  if(isset($build['comments']['comment_form']['My_Image_Field'])){
    // We can't use the unset function. Otherwise we can get something like this:
    // Notice: Undefined index: #file_upload_description in theme_file_widget_multiple() (row 863 file .../docs/modules/file/file.field.inc).
    $build['comments']['comment_form']['My_Image_Field']['und']['#file_upload_description'] = NULL;
  }
}


This removes the entire &lt;p class="help-block">...&lt;/p> element.