form_example_tutorial_9_remove_name

7 form_example_tutorial.inc form_example_tutorial_9_remove_name($form, &$form_state)
8 form_example_tutorial.inc form_example_tutorial_9_remove_name($form, &$form_state)

1 string reference to 'form_example_tutorial_9_remove_name'

File

form_example/form_example_tutorial.inc, line 643
This is the Form API Tutorial from the handbook.

Code

function form_example_tutorial_9_remove_name($form, &$form_state) {
  if ($form_state['num_names'] > 1) {
    $form_state['num_names']--;
  }

  // Setting $form_state['rebuild'] = TRUE causes the form to be rebuilt again.
  $form_state['rebuild'] = TRUE;
}
Login or register to post comments