Details
Description
Online event registration requires that an email address OR first+last name is collected for each participant. The Online Registration tab has a form rule to validate this. However, if the required field(s) appear in a profile that is not slotted in the default 'Top' or 'Bottom' slot (i.e. you click 'Add Profile' and put the profile w/ email/name fields there) - we seem to be ignoring that for purpose of form validation - and hence throwing an erroneous form rule error. If I move around the same 3 profile so the profile with email in it is in slot 1 or 2, no error is thrown.
If NO email or name profile is listed in any slot, AND 'register multiple' is NOT checked, the form rule error also has the wrong text (it's still referring to 'Additional Participants').
In Screenshots attached - neither wa_profile_1 NOR wa_profile_2 contain Email or Name fields.
NOTE: The bug(s) are related to logic in the CRM_Event_Form_ManageEvent_Registration::formRule(). I thin one of tne problems is that additionalProfileIds are being set = to profileIds regardless of whether is_multiple_registrations is TRUE.
— Comment on original post —
The erroneous form rule is triggered when the profile that has the required Email field (Your Registration Info) is placed in the 3rd slot. If you move it to slot 1 or 2, it works as expected.
— Original Post —
civicrm > Event > Manage Events > Configure > Online Registration
check 'Allow Online Registration?' box,
unchecked 'Register multiple participants?' and fill up the form.
if I select a profile which doesn't contain EmailID or First name + last name field in Include Profile (top of page) dropdown also in Include Profile (bottom of page) dropdown.
On clicking 'add profile' link, I select a profile which contains EmailID or First name + last name field in Include Profile (bottom of page) dropdown.
On saving the form, It throws an error 'Please include a Profile for online registration of additional participants that contains an Email Address field and / or First Name + Last Name fields.'
In the above scenario Form rule for 'additional participants' should not get called, as 'Register multiple participants?' is unchecked.