You are here

function ajax_poll_submit in AJAX Poll 7

Same name and namespace in other branches
  1. 6 ajax_poll.module \ajax_poll_submit()

Form API #submit handler. Disable redirects if doing an AJAX vote.

1 string reference to 'ajax_poll_submit'
ajax_poll_form_alter in ./ajax_poll.module
Implements hook_form_alter().

File

./ajax_poll.module, line 73
Enables voting on polls without reloading the page.

Code

function ajax_poll_submit(&$form, &$form_state) {
  if (strpos($_GET['q'], 'poll/ajax') === 0) {
    $form_state['redirect'] = FALSE;
  }
}