You are here

function _civicrm_entity_price_set_field_event_registration_remove_participant_submit in CiviCRM Entity 7.2

Submit handler for the event registration remove participant button

_state

Parameters

$form:

1 string reference to '_civicrm_entity_price_set_field_event_registration_remove_participant_submit'
_civicrm_entity_price_set_field_setup_event_registration_form_fapi in modules/civicrm_entity_price_set_field/includes/civicrm_entity_price_set_field.event_registration.inc
Helper function to setup event registration form FAPI

File

modules/civicrm_entity_price_set_field/includes/civicrm_entity_price_set_field.event_registration.inc, line 1045
CiviCRM Entity Price Set Field, Form display formatter, event registration

Code

function _civicrm_entity_price_set_field_event_registration_remove_participant_submit($form, &$form_state) {
  $count = $form_state['triggering_element']['#contact_count'];
  unset($form_state['contacts'][$count]);
  if (isset($form_state['storage']['registration_form']['contacts'][$count])) {
    unset($form_state['storage']['registration_form']['contacts'][$count]);
  }
  $form_state['rebuild'] = TRUE;
}