I want to hide the description of the text format under the "Comment" box which says:

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.

There are a variety of ways to do this on Drupal 7, but what about Drupal 8?

  • After Drupal core 10 the allowed formats can be set as an option in text fields configuration. See:drupal.org/node/3318572.
    – dxvargas
    Commented Oct 3, 2023 at 9:03
  • 1
    @dxvargas That's right; we should refresh this question. Please add that as an answer and I will accept. Commented Oct 4, 2023 at 2:13

6 Answers 6


AFAIK there is currently no core UI to control showing/hiding of those tips.

Th simplify module, one of the D7 choices you link to, has a D8 port that may still help with this.

The Allowed formats module is an incubator for future core improvements in the area of giving sitebuilder's UI control over text format and their help tips.

== UPDATE ==

A patch just committed to that module gives sitebuilders considerable control over help tips, using UI settings on the widgets.

== OLD ==

There are a couple of relevant issue in the issue queue for that module:

Allow to control if "About text formats" link should be shown or not

Allow to hide text format help text for Text(formatted)

The first of those issues contains this code from floretan, which points in the direction you would need to go to hide the help by custom code:

 * Implements hook_field_widget_form_alter().
function allowed_formats_field_widget_form_alter(&$element, FormStateInterface $form_state, $context) {
  if ($context['widget'] instanceof \Drupal\text\Plugin\Field\FieldWidget\TextareaWidget) {
    $element['#after_build'][] = '_allowed_formats_remove_textarea_help';

 * #after_build callback.
function _allowed_formats_remove_textarea_help($form_element, FormStateInterface $form_state) {
  if (isset($form_element['format'])) {
    // All this stuff is needed to hide the help text.

  return $form_element;
  • Unfortunately removes this the tips and guidelines etc. on all admin pages too ;( To use this only on node edit pages you can check this with if ('entity.node.edit_form' === \Drupal::routeMatch()->getRouteName() && $context…. And you should thinking about TextareaWithSummaryWidget as other possible widget type.
    – RWAM
    Commented Feb 17, 2017 at 15:39
  • The second portion of the code helped me. Thanks
    – Binny
    Commented Sep 30, 2020 at 7:33

This work for me in drupal 8, You have to change the field machine name


use Drupal\Core\Form\FormStateInterface;

 * Implements hook_field_widget_form_alter().
function YOURMODULENAME_form_alter(&$form, &$form_state, &$form_id) {
    $form['field_short_description']['widget']['#after_build'][] = '_allowed_formats_remove_textarea_help';

function _allowed_formats_remove_textarea_help($form_element, FormStateInterface $form_state) {

  if (isset($form_element[0]['format'])) {
    // All this stuff is needed to hide the help text.
    $form_element[0]['format']['format']['#access'] = FALSE;

  return $form_element;
  • This should be marked as a correct answer for Drupal 8 Commented Oct 19, 2018 at 13:50
  • Somehow my $form_element does not have the same values as above, so nothing to disable :-(
    – frazras
    Commented May 13, 2019 at 16:36

As simple and general solution (for all fields) is to install a contributed theme outside core and use that as a administration theme and simply do something like

.filter-guidelines-item .tips { display:none; }

Or patch one of the themes inside core and make a note to repatch when you do an upgrade.


If you are wondering how to do this in Form API, so when you are creating form elements in a Form class instead of altering form elements afterwards:

Your form element:

$form['my_field'] = [
  '#type' => 'text_format',
  '#title' => 'My Title',
  '#allowed_formats' => ['basic_html'],
  '#after_build' => [[get_class($this), 'hideTextFormatHelpText'],],

Add this function to your class:

  public static function hideTextFormatHelpText(array $element, FormStateInterface $form_state) {
    if (isset($element['format']['help'])) {
      $element['format']['help']['#access'] = FALSE;
    if (isset($element['format']['guidelines'])) {
      $element['format']['guidelines']['#access'] = FALSE;
    if (isset($element['format']['#attributes']['class'])) {
    return $element;

I specifically also removed the classes because you will otherwise see some padding and a border around something empty that you probably don't want.


There is a very simple way to do this. Filter tips are displayed within a block so you can go to appearance/settings and than go to theme customize css.

Add following:

.filter-wrapper { display: none; }

You can also add.

.description { display: none; }


After Drupal core 10 the allowed formats can be set as an option in text fields configuration.

See: https://www.drupal.org/node/3318572.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.