function _webform_edit_boolean in Webform Boolean 7
Implements _webform_edit_component().
File
- components/
boolean.inc, line 54 - A boolean field for webform.
Code
function _webform_edit_boolean($component) {
$form = array();
$form['extra'] = array(
'#type' => 'group',
'#title' => t('Field Settings'),
);
$form['extra']['on_value'] = array(
'#type' => 'textfield',
'#title' => t('On value'),
'#default_value' => $component['extra']['on_value'],
'#description' => t('If left empty, "1" will be used.'),
'#size' => 60,
'#maxlength' => 255,
'#weight' => 1,
);
$form['extra']['off_value'] = array(
'#type' => 'textfield',
'#title' => t('Off value'),
'#default_value' => $component['extra']['off_value'],
'#description' => t('If left empty, "0" will be used.'),
'#size' => 60,
'#maxlength' => 255,
'#weight' => 2,
);
return $form;
}