You are here

function _webform_display_optionsmarkup in Webform Options Markup 7

Same name and namespace in other branches
  1. 7.2 components/webform_optionsmarkup.inc \_webform_display_optionsmarkup()

Implements _webform_display_component().

File

components/webform_optionsmarkup.inc, line 302
Webform component that allows markup in checkbox and radio options.

Code

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