You are here

function quiz_question_form_node_form_alter in Quiz 7.5

Same name and namespace in other branches
  1. 8.4 question_types/quiz_question/quiz_question.module \quiz_question_form_node_form_alter()
  2. 7.4 question_types/quiz_question/quiz_question.module \quiz_question_form_node_form_alter()

Implements hook_form_BASE_FORM_ID_alter().

In this function we alter node forms.

File

question_types/quiz_question/quiz_question.module, line 100
Quiz Question module.

Code

function quiz_question_form_node_form_alter(&$form, $form_state, $form_id) {
  $types = quiz_get_question_types();
  $node = $form_state['node'];
  if (array_key_exists($node->type, $types)) {
    $form['actions']['submit']['#submit'][] = 'quiz_question_node_form_submit';
  }
}