poll_cancel_form

Versions
5
poll_cancel_form($nid)
6
poll_cancel_form(&$form_state, $nid)
7
poll_cancel_form($form, &$form_state, $nid)

Builds the cancel form for a poll.

See also

poll_cancel()

Related topics

Code

modules/poll/poll.module, line 848

<?php
function poll_cancel_form($form, &$form_state, $nid) {
  $form_state['cache'] = TRUE;

  // Store the nid so we can get to it in submit functions.
  $form['#nid'] = $nid;

  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Cancel your vote'),
    '#submit' => array('poll_cancel')
  );

  return $form;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.