You are here

function theme_webform_display_textarea in Webform 7.4

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

Format the output of data for this component.

1 theme call to theme_webform_display_textarea()
_webform_display_textarea in components/textarea.inc
Implements _webform_display_component().

File

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

Code

function theme_webform_display_textarea($variables) {
  $element = $variables['element'];
  $output = $element['#format'] == 'html' ? nl2br(check_plain($element['#value'])) : $element['#value'];
  if (drupal_strlen($output) > 80) {
    $output = $element['#format'] == 'html' ? '<div class="webform-long-answer">' . $output . '</div>' : $output;
  }
  return $output !== '' ? $output : ' ';
}