poll_cancel_form

5 poll.module poll_cancel_form($nid)
6 poll.module poll_cancel_form(&$form_state, $nid)
7 poll.module poll_cancel_form($form, &$form_state, $nid)
8 poll.module poll_cancel_form($form, &$form_state, $nid)

Builds the cancel form for a poll.

See also

poll_cancel()

Related topics

1 string reference to 'poll_cancel_form'

File

modules/poll/poll.module, line 944
Enables your site to capture votes on different topics in the form of multiple choice questions.

Code

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['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit', 
    '#value' => t('Cancel your vote'), 
    '#submit' => array('poll_cancel'),
  );

  return $form;
}
Login or register to post comments