Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By cosmicdreams on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Introduced in version:
8.x
Issue links:
Description:
API changes
textarea.js
, previously used to create resizable textarea form elements, has been removed from core.- Instead, the CSS3
resize
property for textarea elements now controls this behavior. - The #resizable Form API property now supports four possible values:
vertical
horizontal
both
none
-
The following styles are available to themes
resizeable-vertical
resizeable-horizontal
resizeable-both
resizeable-none
UI changes
Before
Now
Sample usage
Before
function mymodule_foo_form(&$form, &$form_state) {
$form['blank_verse'] = array(
'#type' => 'textarea',
'#title' => t('Blank verse poem'),
'#description' => t('Lines should be five iambic feet.'),
'#resizable' => TRUE,
);
}
Now
function mymodule_foo_form(&$form, &$form_state) {
$form['blank_verse'] = array(
'#type' => 'textarea',
'#title' => t('Blank verse poem'),
'#description' => t('Lines should be five iambic feet.'),
'#resizable' => 'vertical',
);
}
Impacts:
Site builders, administrators, editors
Module developers
Themers