function ctools_ajax_sample_configure_raptor in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 ctools_ajax_sample/ctools_ajax_sample.module \ctools_ajax_sample_configure_raptor()
Wizard form to configure your raptor.
1 string reference to 'ctools_ajax_sample_configure_raptor'
- ctools_ajax_sample_animals in ctools_ajax_sample/
ctools_ajax_sample.module - Get a list of our animals and associated forms.
File
- ctools_ajax_sample/
ctools_ajax_sample.module, line 596 - Sample AJAX functionality so people can see some of the CTools AJAX features in use.
Code
function ctools_ajax_sample_configure_raptor(&$form, &$form_state) {
$form_state['title'] = t('Configure raptor');
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Name your raptor'),
'#default_value' => $form_state['object']->name,
'#required' => TRUE,
);
$form['raptor'] = array(
'#title' => t('What kind of raptor'),
'#type' => 'radios',
'#options' => array(
t('Eagle') => t('Eagle'),
t('Hawk') => t('Hawk'),
t('Owl') => t('Owl'),
t('Buzzard') => t('Buzzard'),
),
'#default_value' => !empty($form_state['object']->raptor) ? $form_state['object']->raptor : '',
'#required' => TRUE,
);
$form['domesticated'] = array(
'#title' => t('Domesticated'),
'#type' => 'checkbox',
'#default_value' => !empty($form_state['object']->domesticated),
);
}