function fivestar_form_submit in Fivestar 7.2
Same name and namespace in other branches
- 5 fivestar.module \fivestar_form_submit()
- 6.2 fivestar.module \fivestar_form_submit()
- 6 fivestar.module \fivestar_form_submit()
Submit handler for the above form (non-javascript version).
1 string reference to 'fivestar_form_submit'
- fivestar_custom_widget in ./
fivestar.module - Form builder; Build a custom Fivestar rating widget with arbitrary settings.
File
- ./
fivestar.module, line 526
Code
function fivestar_form_submit($form, &$form_state) {
// Cast the vote.
_fivestar_cast_vote($form_state['settings']['content_type'], $form_state['settings']['content_id'], $form_state['values']['vote'], $form_state['settings']['tag']);
// Set a message that the vote was received.
if ($form_state['values']['vote'] === '0') {
drupal_set_message(t('Your vote has been cleared.'));
}
elseif (is_numeric($form_state['values']['vote'])) {
drupal_set_message(t('Thank you for your vote.'));
}
}