You are here

function poll_node_form_submit in Drupal 6

Same name and namespace in other branches
  1. 7 modules/poll/poll.module \poll_node_form_submit()

Renumbers fields and creates a teaser when a poll node is submitted.

File

modules/poll/poll.module, line 353
Enables your site to capture votes on different topics in the form of multiple choice questions.

Code

function poll_node_form_submit(&$form, &$form_state) {

  // Renumber fields
  $form_state['values']['choice'] = array_values($form_state['values']['choice']);
  $form_state['values']['teaser'] = poll_teaser((object) $form_state['values']);
}