theme_textarea
function theme_textarea
theme_textarea($variables)
Returns HTML for a textarea form element.
Parameters
$variables: An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #rows, #cols, #required, #attributes
Related topics
File
- includes/form.inc, line 4068
- Functions for form and batch generation and processing.
Code
function theme_textarea($variables) { $element = $variables['element']; element_set_attributes($element, array('id', 'name', 'cols', 'rows')); _form_set_class($element, array('form-textarea')); $wrapper_attributes = array( 'class' => array('form-textarea-wrapper'), ); // Add resizable behavior. if (!empty($element['#resizable'])) { drupal_add_library('system', 'drupal.textarea'); $wrapper_attributes['class'][] = 'resizable'; } $output = '<div' . drupal_attributes($wrapper_attributes) . '>'; $output .= '<textarea' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>'; $output .= '</div>'; return $output; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!form.inc/function/theme_textarea/7.x