On this page
function template_preprocess_poll_vote
template_preprocess_poll_vote(&$variables)
Themes the voting form for a poll.
Inputs: $form
File
- modules/poll/poll.module, line 794
- Enables your site to capture votes on different topics in the form of multiple choice questions.
Code
function template_preprocess_poll_vote(&$variables) {
$form = $variables['form'];
$variables['choice'] = drupal_render($form['choice']);
$variables['title'] = check_plain($form['#node']->title);
$variables['vote'] = drupal_render($form['vote']);
$variables['rest'] = drupal_render_children($form);
$variables['block'] = $form['#block'];
if ($variables['block']) {
$variables['theme_hook_suggestions'][] = 'poll_vote__block';
}
}
© 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/template_preprocess_poll_vote/7.x