You are here

function _webform_edit_fieldset in Webform 7.3

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

Implements _webform_edit_component().

File

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

Code

function _webform_edit_fieldset($component) {
  $form = array();
  $form['display']['collapsible'] = array(
    '#type' => 'checkbox',
    '#title' => t('Collapsible'),
    '#default_value' => $component['extra']['collapsible'],
    '#description' => t('If this fieldset is collapsible, the user may open or close the fieldset.'),
    '#weight' => 0,
    '#parents' => array(
      'extra',
      'collapsible',
    ),
  );
  $form['display']['collapsed'] = array(
    '#type' => 'checkbox',
    '#title' => t('Collapsed by Default'),
    '#default_value' => $component['extra']['collapsed'],
    '#description' => t('Collapsible fieldsets are "open" by default. Select this option to default the fieldset to "closed."'),
    '#weight' => 3,
    '#parents' => array(
      'extra',
      'collapsed',
    ),
  );
  return $form;
}