function poll_node_form_submit

Entity builder for node_form().

Upon preview and final submission, we need to renumber poll choices and create a teaser output.

See also

poll_teaser()

1 string reference to 'poll_node_form_submit'
poll_form in drupal/core/modules/poll/poll.module
Implements hook_form().

File

drupal/core/modules/poll/poll.module, line 443
Collects votes on different topics in the form of multiple choice questions.

Code

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

  // Renumber choices.
  $entity->choice = array_values($form_state['values']['choice']);
  $form_state['values']['teaser'] = poll_teaser((object) $form_state['values']);
}