You are here

function advpoll_ranking_cancel_form in Advanced Poll 7.3

Same name and namespace in other branches
  1. 7 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_cancel_form()
  2. 7.2 advpoll_ranking/advpoll_ranking.module \advpoll_ranking_cancel_form()

Form element for canceling votes.

2 string references to 'advpoll_ranking_cancel_form'
advpoll_display_borda_results in advpoll_ranking/advpoll_ranking.module
Determines how to theme poll results based on settings in $data.
advpoll_display_runoff_results in advpoll_ranking/advpoll_ranking.module
Determines how to theme poll results for Instant Run-off.

File

advpoll_ranking/advpoll_ranking.module, line 880

Code

function advpoll_ranking_cancel_form($form, &$form_state, $nid) {
  $form['#nid'] = $nid;
  $form['submit'] = array(
    '#type' => 'submit',
    '#ajax' => array(
      'callback' => 'advpoll_ranking_cancel_vote_submit',
      'wrapper' => 'advpoll-' . $nid,
      'name' => 'submit1',
    ),
    '#value' => t('Cancel your vote'),
  );
  return $form;
}