You are here

function invoice_form_alter in Invoice 7

Same name and namespace in other branches
  1. 6 invoice_form.inc \invoice_form_alter()

Implements hook_form_alter()

_state

Parameters

array $form:

string $form_id:

File

./invoice_form.inc, line 871
Invoice module

Code

function invoice_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'invoice_node_form') {
    unset($form['revision_information']);
    unset($form['comment_settings']);
    unset($form['options']['promote']);
    unset($form['options']['sticky']);
    unset($form['actions']['preview']);
  }
  if ($form_id == 'node_type_form' && $form['#node_type']->type == 'invoice') {
    unset($form['submission']['node_preview']);
    unset($form['workflow']['node_options']['#options']['promote']);
    unset($form['workflow']['node_options']['#options']['sticky']);
    unset($form['workflow']['node_options']['#options']['revision']);
    unset($form['comment']);
  }
}