You are here

function formdefaults_enable_submit in Form Defaults 5

Same name and namespace in other branches
  1. 5.3 formdefaults.module \formdefaults_enable_submit()
  2. 5.2 formdefaults.module \formdefaults_enable_submit()
  3. 6.2 formdefaults.module \formdefaults_enable_submit()
  4. 6 formdefaults.module \formdefaults_enable_submit()
  5. 7 formdefaults.module \formdefaults_enable_submit()

Toggle the form editor controls on and off

File

./formdefaults.module, line 387

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;
}