function poll_view_voting_validate

poll_view_voting_validate($form, &$form_state)

Validation function for processing votes

File

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

Code

function poll_view_voting_validate($form, &$form_state) {
  if (empty($form_state['values']['choice'])) {
    form_set_error('choice', t('Your vote could not be recorded because you did not select any of the choices.'));
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!poll!poll.module/function/poll_view_voting_validate/7.x