theme_textarea

Versions
4.7 – 6
theme_textarea($element)
7
theme_textarea($variables)

Theme 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

Return value

A themed HTML string representing the textarea.

Related topics

Code

includes/form.inc, line 2711

<?php
function theme_textarea($variables) {
  $element = $variables['element'];
  $class = array('form-textarea');

  // Add resizable behavior
  if ($element['#resizable'] !== FALSE) {
    drupal_add_js('misc/textarea.js');
    $class[] = 'resizable';
  }

  _form_set_class($element, $class);
  return '<textarea cols="' . $element['#cols'] . '" rows="' . $element['#rows'] . '" name="' . $element['#name'] . '" id="' . $element['#id'] . '" ' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>';
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.