You are here

function _webform_display_hidden in Webform 7.4

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

Implements _webform_display_component().

File

components/hidden.inc, line 106
Webform module hidden component.

Code

function _webform_display_hidden($component, $value, $format = 'html', $submission = array()) {
  $element = array(
    '#title' => $component['name'],
    '#markup' => isset($value[0]) ? $value[0] : NULL,
    '#weight' => $component['weight'],
    '#format' => $format,
    '#theme' => 'webform_display_hidden',
    '#theme_wrappers' => $format == 'text' ? array(
      'webform_element_text',
    ) : array(
      'webform_element',
    ),
    '#translatable' => array(
      'title',
    ),
  );
  return $element;
}