You are here

function _webform_display_select in Webform 7.3

Same name and namespace in other branches
  1. 6.3 components/select.inc \_webform_display_select()
  2. 7.4 components/select.inc \_webform_display_select()

Implements _webform_display_component().

File

components/select.inc, line 448
Webform module multiple select component.

Code

function _webform_display_select($component, $value, $format = 'html') {
  return array(
    '#title' => $component['name'],
    '#weight' => $component['weight'],
    '#multiple' => $component['extra']['multiple'],
    '#theme' => 'webform_display_select',
    '#theme_wrappers' => $format == 'html' ? array(
      'webform_element',
    ) : array(
      'webform_element_text',
    ),
    '#format' => $format,
    '#options' => _webform_select_options($component, !$component['extra']['aslist']),
    '#value' => (array) $value,
    '#translatable' => array(
      'title',
      'options',
    ),
  );
}