1 ajax_example_graceful_degradation.inc ajax_example_add_more_add_one($form, &$form_state)

Submit handler for the "add-one-more" button.

Increments the max counter and causes a rebuild.

Related topics

File

modules/examples/ajax_example/ajax_example_graceful_degradation.inc, line 637
Demonstrations of AJAX with graceful degradation.

Code

function ajax_example_add_more_add_one($form, &$form_state) {
  $form_state['num_names']++;
  $form_state['rebuild'] = TRUE;
}