You are here

function _webform_display_textarea in Webform 6.3

Same name and namespace in other branches
  1. 7.4 components/textarea.inc \_webform_display_textarea()
  2. 7.3 components/textarea.inc \_webform_display_textarea()

Implements _webform_display_component().

File

components/textarea.inc, line 140
Webform module textarea component.

Code

function _webform_display_textarea($component, $value, $format = 'html') {
  return array(
    '#title' => $component['name'],
    '#weight' => $component['weight'],
    '#theme' => 'webform_display_textarea',
    '#theme_wrappers' => $format == 'html' ? array(
      'webform_element',
      'webform_element_wrapper',
    ) : array(
      'webform_element_text',
    ),
    '#post_render' => array(
      'webform_element_wrapper',
    ),
    '#format' => $format,
    '#value' => isset($value[0]) ? $value[0] : '',
    '#translatable' => array(
      'title',
    ),
  );
}