You are here

function registration_checkin_registration_form_submit in Entity Registration 7.2

Custom submit handler for the registration form.

1 string reference to 'registration_checkin_registration_form_submit'
registration_checkin_form_registration_form_alter in modules/registration_checkin/registration_checkin.module
Implements hook_form_FORM_ID_alter().

File

modules/registration_checkin/registration_checkin.module, line 47
Entity Registration registrant checkin workflow and UI for registration.

Code

function registration_checkin_registration_form_submit($form, &$form_state) {

  // If we are submitting a new registration with the state as "attended",
  // we likely came from the new registrations buttuon on the checkin listing.
  // Return there since it's the next logical place for the user to be.
  if ($form_state['values']['state'] == 'attended') {
    $entity_type = $form_state['complete form']['#registration_settings']['entity_type'];
    $entity_id = $form_state['complete form']['#registration_settings']['entity_id'];
    $form_state['redirect'] = $entity_type . '/' . $entity_id . '/registrations/checkin';
  }
}