You are here

function answers_assign_question_reference in Answers 7.3

Assign question reference to hidden question field.

1 string reference to 'answers_assign_question_reference'
answers_form_answer_node_form_alter in ./answers.module
Implements hook_form_FORM_ID_alter() for answer_node_form().

File

./answers.module, line 322

Code

function answers_assign_question_reference(&$form, &$form_state) {
  if (!empty($form_state['storage']['answers_question'])) {
    $form_state['values']['field_answer_question'][$form_state['values']['language']][0]['nid'] = $form_state['storage']['answers_question'];
  }
}