Node fields configuration page showing selecting a text area (multiple lines) for a text field

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 around 255 or 500 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 Mastadon 500), but people use line breaks there to great effect.

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.)

Supporting organizations: 
Came up with the concept and built it
Funded development
Contributed and maintains the Drupal 7 branch

Project information

Downloads