You are here

function formdefaults_enable in Form Defaults 7

Same name and namespace in other branches
  1. 5.3 formdefaults.module \formdefaults_enable()
  2. 5 formdefaults.module \formdefaults_enable()
  3. 5.2 formdefaults.module \formdefaults_enable()
  4. 6.2 formdefaults.module \formdefaults_enable()
  5. 6 formdefaults.module \formdefaults_enable()
1 string reference to 'formdefaults_enable'
formdefaults_menu in ./formdefaults.module
Implements hook_menu.

File

./formdefaults.module, line 313

Code

function formdefaults_enable() {
  $form['instructions'] = array(
    '#type' => 'markup',
    '#markup' => '<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;
}