You are here

function advpoll_more_choices_submit in Advanced Poll 6.2

Same name and namespace in other branches
  1. 6.3 advpoll.module \advpoll_more_choices_submit()
  2. 6 advpoll.module \advpoll_more_choices_submit()

Process advpoll_more_choices form submissions.

File

./advpoll.module, line 560
Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.

Code

function advpoll_more_choices_submit($form, &$form_state) {

  // Based on poll.module
  node_form_submit_build_node($form, $form_state);
  if ($form_state['values']['more_choices']) {
    $n = $_GET['q'] == 'advpoll/js_more_choices' ? 1 : 5;
    $form_state['choice_count'] = count($form_state['values']['choice']) + $n;
  }
}