You are here

function commons_answers_add_question_form in Drupal Commons 6.2

1 string reference to 'commons_answers_add_question_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 156

Code

function commons_answers_add_question_form(&$form_state, $group_nid) {
  $form['question'] = array(
    '#type' => 'fieldset',
    '#title' => t('Ask a question'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['question']['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Question'),
    '#required' => TRUE,
  );
  $form['question']['body'] = array(
    '#type' => 'textarea',
    '#title' => t('Additional information'),
  );
  $form['question']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add question'),
  );
  $form['group_nid'] = array(
    '#type' => 'value',
    '#value' => $group_nid,
  );
  return $form;
}