poll_cancel_form

Definition

poll_cancel_form(&$form_state, $nid)
modules/poll/poll.module, line 754

Description

Builds the cancel form for a poll.

See also

poll_cancel()

Related topics

Namesort iconDescription
Form builder functionsFunctions that build an abstract representation of a HTML form.

Code

<?php
function poll_cancel_form(&$form_state, $nid) {
  // 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')
  );

  $form['#cache'] = TRUE;

  return $form;
}
?>
 
 

Drupal is a registered trademark of Dries Buytaert.