Same name and namespace in other branches
  1. 4.7.x includes/form.inc \theme_textarea()
  2. 6.x includes/form.inc \theme_textarea()
  3. 7.x includes/form.inc \theme_textarea()

Format a textarea.

Parameters

$element: An associative array containing the properties of the element. Properties used: title, value, description, rows, cols, required, attributes

Return value

A themed HTML string representing the textarea.

Related topics

File

includes/form.inc, line 1457

Code

function theme_textarea($element) {
  $class = array(
    'form-textarea',
  );
  if ($element['#resizable'] !== FALSE) {
    drupal_add_js('misc/textarea.js');
    $class[] = 'resizable';
  }
  $cols = $element['#cols'] ? ' cols="' . $element['#cols'] . '"' : '';
  _form_set_class($element, $class);
  return theme('form_element', $element, '<textarea' . $cols . ' rows="' . $element['#rows'] . '" name="' . $element['#name'] . '" id="' . $element['#id'] . '" ' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>');
}