function advpoll_writein_promote_form in Advanced Poll 6.3
Same name and namespace in other branches
- 5 advpoll.module \advpoll_writein_promote_form()
- 6 advpoll.module \advpoll_writein_promote_form()
- 6.2 advpoll.module \advpoll_writein_promote_form()
1 string reference to 'advpoll_writein_promote_form'
File
- ./
advpoll.module, line 1670 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function advpoll_writein_promote_form(&$form_state, $node) {
$form = array();
$form['fieldset'] = array(
'#type' => 'fieldset',
'#collapsible' => FALSE,
'#title' => t('Promote write-ins'),
);
$form['fieldset']['note'] = array(
'#value' => '<p class="description">' . t('Write-ins can be converted to regular choices. This is useful if users cannot see past write-ins but you want to promote specific write-ins so that they can be seen by users who vote in the future.') . '</p>',
);
$writein_list = array();
foreach ($node->choice as $index => $choice) {
if ($choice['writein']) {
$writein_list[$index] = $choice['label'];
}
}
$form['fieldset']['promote'] = array(
'#type' => 'checkboxes',
'#options' => $writein_list,
);
$form['fieldset']['submit'] = array(
'#type' => 'submit',
'#value' => t('Promote'),
);
$form['nid'] = array(
'#type' => 'value',
'#value' => $node->nid,
);
return $form;
}