function ctools_ajax_sample_start

Wizard start form. Choose an animal.

1 string reference to 'ctools_ajax_sample_start'
ctools_ajax_sample_animal in ctools_ajax_sample/ctools_ajax_sample.module
A modal login callback.

File

ctools_ajax_sample/ctools_ajax_sample.module, line 549

Code

function ctools_ajax_sample_start($form, &$form_state) {
    $form_state['title'] = t('Choose animal');
    $animals = ctools_ajax_sample_animals();
    foreach ($animals as $id => $animal) {
        $options[$id] = $animal['title'];
    }
    $form['type'] = array(
        '#title' => t('Choose your animal'),
        '#type' => 'radios',
        '#options' => $options,
        '#default_value' => $form_state['object']->type,
        '#required' => TRUE,
    );
    return $form;
}