function formdefaults_enable in Form Defaults 6
Same name and namespace in other branches
- 5.3 formdefaults.module \formdefaults_enable()
- 5 formdefaults.module \formdefaults_enable()
- 5.2 formdefaults.module \formdefaults_enable()
- 6.2 formdefaults.module \formdefaults_enable()
- 7 formdefaults.module \formdefaults_enable()
1 string reference to 'formdefaults_enable'
- formdefaults_menu in ./
formdefaults.module - Implements hook_menu.
File
- ./
formdefaults.module, line 373
Code
function formdefaults_enable() {
$form['instructions'] = array(
'#type' => markup,
'#value' => '<p>To alter the defaults associated with a form, enable the forms module below and look for the [edit] ' . 'controls in the description of each form field. Navigate to the form and click [edit] link on the field ' . 'you want to edit. You\'ll be allowed to edit field titles, markup fields (like this one) as well as the textual descriptions ' . 'with each field.</p>',
);
if ($_SESSION['formdefaults_enabled']) {
$form['disable'] = array(
'#type' => 'submit',
'#value' => 'disable',
);
}
else {
$form['enable'] = array(
'#type' => 'submit',
'#value' => 'enable',
);
}
return $form;
}