You are here

function commons_answers_add_answer_form in Drupal Commons 6.2

1 string reference to 'commons_answers_add_answer_form'
commons_answers_views_pre_render in modules/features/commons_answers/commons_answers.module
Implementation of hook_views_pre_render().

File

modules/features/commons_answers/commons_answers.module, line 222

Code

function commons_answers_add_answer_form(&$form_state, $question_nid) {
  $form['answer'] = array(
    '#type' => 'textarea',
    '#title' => t('Add answer'),
    '#required' => TRUE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add answer'),
  );
  $form['question_nid'] = array(
    '#type' => 'value',
    '#value' => $question_nid,
  );
  return $form;
}