function formdefaults_enable in Form Defaults 6.2
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 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 315
Code
function formdefaults_enable() {
$form['instructions'] = array(
'#type' => markup,
'#value' => '<p>To alter the default labels and text descriptions associated with a form, enable the form ' . 'defaults editor below. Navigate to the form you wish to modify and click the [edit] link on ' . 'the field you want to edit. You\'ll be allowed to edit field titles and markup fields ' . '(like this one), as well as the textual descriptions for each field. It\'s also possible to ' . 'add form elements and hide those already present.</p>' . '<p>Use the controls above to manage those forms you\'ve modified.</p>',
);
if ($_SESSION['formdefaults_enabled']) {
$form['disable'] = array(
'#type' => 'submit',
'#value' => 'disable',
);
}
else {
$form['enable'] = array(
'#type' => 'submit',
'#value' => 'enable',
);
}
return $form;
}