function advpoll_binary_node_form_submit in Advanced Poll 6.3
Same name and namespace in other branches
- 6 advpoll.module \advpoll_binary_node_form_submit()
- 6.2 advpoll.module \advpoll_binary_node_form_submit()
Process advpoll_binary_node form submissions.
Update the choices added or removed when editing a binary poll
File
- ./
advpoll.module, line 1153 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function advpoll_binary_node_form_submit($form, &$form_state) {
// Get the submitted (modified) choices from _POST and replace them in the form values
// Note: we pass choice data via _POST to allow for dynamic addition of choices.
// TODO: Implement AHAH support for advpoll node form
if (isset($_POST['choice'])) {
$form_state['values']['choice'] = $_POST['choice'];
}
}