function ctools_ajax_sample_start_submit in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 ctools_ajax_sample/ctools_ajax_sample.module \ctools_ajax_sample_start_submit()
They have selected a sheep. Set it.
File
- ctools_ajax_sample/
ctools_ajax_sample.module, line 571 - Sample AJAX functionality so people can see some of the CTools AJAX features in use.
Code
function ctools_ajax_sample_start_submit(&$form, &$form_state) {
$form_state['object']->type = $form_state['values']['type'];
// Override where to go next based on the animal selected.
$form_state['clicked_button']['#next'] = $form_state['values']['type'];
}