You are here

function theme_webform_display_textfield in Webform 7.4

Same name and namespace in other branches
  1. 6.3 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 231
Webform module textfield component.

Code

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