Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

textarea_widget_for_text

1,793 sites Security covered
View on drupal.org

Allow text fields to use the multiline text area widget on content entry forms.

Nothing about a regular, "short" text field with a limit of 255 or 500 or even 2,000 characters logically requires that it be entered in an input field of only one line.

Drupal by default will only give you a widget allowing text entry to be done on one line though. This module removes that restriction. With this module enabled, you can use the textarea widget on a regular text field.

Why?

Any time you want to keep a low, hard limit on the size of what is saved but want to give the person entering content more than a single line with which to do it (or to easily switch from single line to multiline entry, without a migration). Examples:

If you're letting people enter a list free-form rather than using a multivalue textfield, you are unlikely to need the long text size.

Or if you are creating a special teaser field, that too is best entered in a textarea widget but does not need to be saved as long text.

Twitter is a 140 280 character limit (and Mastodon 500), but people use line breaks there to great effect.

You can have ordinary text fields (which map to varchar and similar) with a couple thousand characters perfectly safely even with multibyte Unicode characters; just be sure if you are using this that you very intentionally have a limit because otherwise you should use "Text (long)" for your field.

Doing without this module

If you don't want to rely on this module, you can stick this code in your own custom module or profile, changing 'example' to your module's name:

function example_field_widget_info_alter(&$info) {
  $info['text_textarea']['field_types'][] = 'text';
  $info['string_textarea']['field_types'][] = 'string'
}

(The first line is for Text (formatted) fields provided by the Drupal core Text module; the latter is for Text (plain) fields provided by Drupal core.)

Activity

Total releases
1
First release
Apr 2025
Latest release
11 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
8.x-1.4 Stable Apr 29, 2025