function poll_node_form_submit

poll_node_form_submit(&$form, &$form_state)

Form submit handler for node_form().

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

File

modules/poll/poll.module, line 445
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 choices.
  $form_state['values']['choice'] = array_values($form_state['values']['choice']);
  $form_state['values']['teaser'] = poll_teaser((object) $form_state['values']);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!poll!poll.module/function/poll_node_form_submit/7.x