1 form_example_wizard.inc form_example_wizard_personal_info($form, &$form_state)

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

This is the first step of the wizard, asking for two textfields: first name and last name.

Related topics

File

modules/examples/form_example/form_example_wizard.inc, line 217
Extensible wizard form example.

Code

function form_example_wizard_personal_info($form, &$form_state) {
  $form = array();
  $form['first_name'] = array(
    '#type' => 'textfield',
    '#title' => t('First Name'),
    '#default_value' => !empty($form_state['values']['first_name']) ? $form_state['values']['first_name'] : '',
  );
  $form['last_name'] = array(
    '#type' => 'textfield',
    '#title' => t('Last Name'),
    '#default_value' => !empty($form_state['values']['last_name']) ? $form_state['values']['last_name'] : '',
  );
  return $form;
}