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

Project Usage
1736
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
DEV
Module Summary
This module enables the use of the multiline text area widget on content entry forms for text fields.
Data Name
textarea_widget_for_text

OPENAI CHATBOT

OPENAI CHATBOT

14:35:59
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.