function form_example_wizard_location_info

Returns form elements for the 'location info' page of the wizard.

This is the second step of the wizard. This step asks for a textfield value: a City. This step also includes a validation declared later.

Related topics

1 string reference to 'form_example_wizard_location_info'
_form_example_steps in form_example/form_example_wizard.inc
Returns the list of steps and their associated forms.

File

form_example/form_example_wizard.inc, line 241

Code

function form_example_wizard_location_info($form, &$form_state) {
    $form = array();
    $form['city'] = array(
        '#type' => 'textfield',
        '#title' => t('City'),
        '#description' => t('Hint: Do not enter "San Francisco", and do not leave this out.'),
        '#required' => TRUE,
        '#default_value' => !empty($form_state['values']['city']) ? $form_state['values']['city'] : '',
    );
    return $form;
}