You are here

function theme_webform_display_textfield in Webform 6.3

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

Format the output of data for this component.

2 theme calls to theme_webform_display_textfield()
_webform_display_component in ./webform.api.php
Display the result of a submission for a component.
_webform_display_textfield in components/textfield.inc
Implements _webform_display_component().

File

components/textfield.inc, line 194
Webform module textfield component.

Code

function theme_webform_display_textfield($element) {
  $prefix = $element['#format'] == 'html' ? filter_xss($element['#field_prefix']) : $element['#field_prefix'];
  $suffix = $element['#format'] == 'html' ? filter_xss($element['#field_suffix']) : $element['#field_suffix'];
  $value = $element['#format'] == 'html' ? check_plain($element['#value']) : $element['#value'];
  return $value !== '' ? $prefix . $value . $suffix : ' ';
}