You are here

function _webform_display_fieldset in Webform 6.3

Same name and namespace in other branches
  1. 7.4 components/fieldset.inc \_webform_display_fieldset()
  2. 7.3 components/fieldset.inc \_webform_display_fieldset()

Implements _webform_display_component().

File

components/fieldset.inc, line 84
Webform module fieldset component.

Code

function _webform_display_fieldset($component, $value, $format = 'html') {
  if ($format == 'text') {
    $element = array(
      '#title' => $component['name'],
      '#weight' => $component['weight'],
      '#post_render' => array(
        'webform_element_wrapper',
      ),
      '#theme_wrappers' => array(
        'webform_element_text',
      ),
      '#translatable' => array(
        'title',
      ),
    );
  }
  else {
    $element = _webform_render_fieldset($component, $value);
  }
  $element['#format'] = $format;
  return $element;
}