function advpoll_preprocess_advpoll_voting_binary_form in Advanced Poll 6.3
Same name and namespace in other branches
- 6 modes/binary.inc \advpoll_preprocess_advpoll_voting_binary_form()
- 6.2 modes/binary.inc \advpoll_preprocess_advpoll_voting_binary_form()
Process variables for advpoll-display-binary-form.tpl.php.
The variables array contains the following arguments:
- $form
See also
advpoll-display-binary-form.tpl.php
File
- modes/
binary.inc, line 344 - Handle binary (true/false) votes.
Code
function advpoll_preprocess_advpoll_voting_binary_form(&$variables) {
$form =& $variables['form'];
//print_r($form);
$variables['message'] = drupal_render($form['message']);
$variables['footer_message'] = $form['#node']->footer_message;
// If write-ins are used on this form.
if (isset($form['writein_choice'])) {
$variables['writein_choice'] = drupal_render($form['writein_choice']);
}
$variables['form_id'] = $form['#id'];
// List of available choices in the poll.
$variables['choice_list'] = drupal_render($form['choice']);
// Take off the annoying colon & endlines that Drupal adds to each title.
$variables['choice_list'] = preg_replace('/[\\n\\r]*: <\\/label>[\\n\\r]*/i', '</label>', $variables['choice_list']);
// All remaining form elements.
$variables['form_submit'] = drupal_render($form);
}