You are here

function _webform_render_fieldset in Webform 7.4

Same name and namespace in other branches
  1. 5.2 components/fieldset.inc \_webform_render_fieldset()
  2. 5 components/fieldset.inc \_webform_render_fieldset()
  3. 6.3 components/fieldset.inc \_webform_render_fieldset()
  4. 6.2 components/fieldset.inc \_webform_render_fieldset()
  5. 7.3 components/fieldset.inc \_webform_render_fieldset()

Implements _webform_render_component().

1 call to _webform_render_fieldset()
_webform_display_fieldset in components/fieldset.inc
Implements _webform_display_component().

File

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

Code

function _webform_render_fieldset($component, $value = NULL, $filter = TRUE, $submission = NULL) {
  $node = isset($component['nid']) ? node_load($component['nid']) : NULL;
  $element = array(
    '#type' => 'fieldset',
    '#title' => $filter ? webform_filter_xss($component['name']) : $component['name'],
    '#title_display' => $component['extra']['title_display'] ? $component['extra']['title_display'] : NULL,
    '#weight' => $component['weight'],
    '#description' => $filter ? webform_filter_descriptions($component['extra']['description'], $node) : $component['extra']['description'],
    '#collapsible' => $component['extra']['collapsible'],
    '#collapsed' => $component['extra']['collapsed'],
    '#attributes' => array(
      'class' => array(
        'webform-component-fieldset',
      ),
    ),
    '#pre_render' => array(
      'webform_fieldset_prerender',
      'webform_element_title_display',
    ),
    '#translatable' => array(
      'title',
      'description',
    ),
  );
  return $element;
}