Details
Description
Summary
------------
An event can be configured to allow someone to register multiple participants at the same time using the online registration process. When this option is enabled, the person completing the online registration form can click a link saying they want to "Register additional people". They then get prompted for "How many additional people?" and enter a number. Additional text will tell them "You will be able to enter registration information for each additional person after you complete this page and click Continue."
After submitting the initial registration page, including any embedded Profile field(s) and billing info, they will be presented with a new page (form) to complete for each additional participant. Each of these pages will contain the configured Fee Levels form element (radio buttons), an optional email address field, and any profile fields configured for the event. (Example: If the event is configured to include a participant field for Meal Choice - this field is presented for each additional participant.)
A contact record is saved (or if matching, updated) and a pending participant record is created on each form submit.
The Confirm page needs to display a block for each participant, including their "profile" values and the selected Fee Level.
1. Schema Changes
----------------------------
1.1 New column for civicrm_event_page, stores event configuration option to allow multiple participant registration:
is_multiple_registrations BOOLEAN Default = 0
1.2 New column for civicrm_participant, stores ID of the participant who registered this participant:
registered_by_id INT FK to civicrm_participant.id (on delete of related record, set NULL)
2. User Interface Changes
------------------------------------
2.1 Manage Events >> Configure >> Online Registration
- Add checkbox form field to this form below the Registration End Date field.
- Field Label = Register Multiple Participants?
2.2 Online Registration >> Register
- If is_multiple_registrations = true, add clickable link below Event Fees form element: "Register additional people for this event?"
- Onclick, show a text field with prompt: "How many additional people?" Help text below this field is "You will be able to enter registration information for each additional person after you complete this page and click Continue."
- When Register form is submitted, if "additional_participants" > 0 - load an instance of a new form. Form title: "Register Additional Participant". Form contains:
- Fee field(s) - Fee levels or Price Set fields
- Email Address
- Each configured Profile fieldset (in weight order)
- Form buttons: Previous, Continue
- These pages also need a "Skip this person" Link which submits the form - but WITHOUT saving any contact and participant info.
- Load an instance of this form for each count of additional_participants.
NOTE: For "free" events, the flow is the same as above up to this point.
2.3 Online Registration >> Confirm
(Confirmation page is skipped for free events as usual.)
- Confirmation page includes a complete set of information for EACH participant to be registered
- The total fee for all participants is calculated and displayed prominently.
2.4 Online Registration >> Thankyou
- Thankyou page includes a complete set of information for EACH registered participant
2.5 Confirmation / Receipt
- A receipt/confirmation is sent to the "primary" participant which includes participant and fee info for EACH registered participant along with total fee. (This is the same as our existing event "receipt" but with "loop" to show info for each participant and a new "Total Fees" line.)
- A "confirmation" is sent to each additional participant for whom an Email Address has been entered. The content of this email is limited to the event-configured email text and the "Event Information" section from the template.
3. Processing Changes
--------------------------------
3.1 Modify existing post process logic to move creating (or updating) the contact and the pending participant record from the Confirm form submit to the Register form (step 1) submit.
(Note that we already do this for "free" (is_monetary = false) events - so this should make the code more consistent.)
3.2 *** Make the same change in online contribution page processing - so we are consistent in how we do this. ****
3.3 Save (or update existing) contact record and a linked participant record for each submitted "additional participant" form. The "primary participant" ID is saved to the registered_by_id column when creating these participant records.
3.4 Payments:
- Modify Confirm post process to submit aggregate fee total to payment processor
- Create one contribution record with the total aggregated amount and one participant_payment record linked to the "primary" participant.
EXAMPLE:
Registering person says they want to register 2 additional participants and completes the forms for themselves and two other people. On successful completion of this registration there should be:
- 3 contact records (assuming none are matches to existing records)
- 3 participant records
- 1 contribution record
- 1 participant_payment record
NOTE: The related specification for "Discount pricing by date" includes changes to the civicrm_participant record which also affect post processing here. The Label corresponding to the selected event level for each participant should be stored in participant.fee_level and the actual amount for each participant is stored in fee_amount. The fee_level/fee_amount can be different for each of the multiple participants.