function _webform_edit_fieldset in Webform 5.2
Same name and namespace in other branches
- 5 components/fieldset.inc \_webform_edit_fieldset()
- 6.3 components/fieldset.inc \_webform_edit_fieldset()
- 6.2 components/fieldset.inc \_webform_edit_fieldset()
- 7.4 components/fieldset.inc \_webform_edit_fieldset()
- 7.3 components/fieldset.inc \_webform_edit_fieldset()
Create a set of form items to be displayed on the form for editing this component. Use care naming the form items, as this correlates directly to the database schema. The component "Name" and "Description" fields are added to every component type and are not necessary to specify here (although they may be overridden if desired).
Return value
An array of form items to be displayed on the edit component page.
File
- components/
fieldset.inc, line 34 - Webform module fieldset component.
Code
function _webform_edit_fieldset($currfield) {
$edit_fields = array();
$edit_fields['extra']['collapsible'] = array(
'#type' => 'checkbox',
'#title' => t('Collapsible'),
'#default_value' => $currfield['extra']['collapsible'],
'#description' => t('If this fieldset is collapsible, the user may open or close the fieldset.'),
'#weight' => 0,
);
$edit_fields['extra']['collapsed'] = array(
'#type' => 'checkbox',
'#title' => t('Collapsed by Default'),
'#default_value' => $currfield['extra']['collapsed'],
'#description' => t('Collapsible fieldsets are "open" by default. Select this option to default the fieldset to "closed."'),
'#weight' => 3,
);
$edit_fields['advanced']['mandatory'] = array();
return $edit_fields;
}