You are here

function ahah_example_simple_validation_submit in Examples for Developers 6

Submit handler for simple validation.

Gets called even when our select is active, so we use the $form_state to determine whether the submit handler should actually do anything.

File

ahah_example/ahah_example_simple_validation.inc, line 54
Demonstrate validation of a textfield using AHAH. This approach allows 'live' validation of a field which degrades gracefully when JavaScript is not available.

Code

function ahah_example_simple_validation_submit($form, &$form_state) {
  if (!empty($form_state['ahah_submission'])) {
    return;
  }

  // Continue to handle submit processing.
}