function formdefaults_enable_submit in Form Defaults 5.3
Same name and namespace in other branches
- 5 formdefaults.module \formdefaults_enable_submit()
- 5.2 formdefaults.module \formdefaults_enable_submit()
- 6.2 formdefaults.module \formdefaults_enable_submit()
- 6 formdefaults.module \formdefaults_enable_submit()
- 7 formdefaults.module \formdefaults_enable_submit()
Toggle the form editor controls on and off
File
- ./
formdefaults.module, line 366
Code
function formdefaults_enable_submit($formid, $form_values) {
$editor_enabled = $_SESSION['formdefaults_enabled'];
if ($editor_enabled) {
$_SESSION['formdefaults_enabled'] = false;
drupal_set_message('Form defaults editor is now disabled');
}
else {
$_SESSION['formdefaults_enabled'] = true;
drupal_set_message('Form defaults editor is now enabled');
}
return $output;
}