You are here

function theme_webform_display_number in Webform 7.4

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

Format the output of data for this component.

1 theme call to theme_webform_display_number()
_webform_display_number in components/number.inc
Implements _webform_display_component().

File

components/number.inc, line 414
Webform module number component.

Code

function theme_webform_display_number($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 : ' ';
}