Closed (works as designed)
Project:
Entity Registration
Version:
7.x-1.x-dev
Component:
Registration Entity Access
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2012 at 15:54 UTC
Updated:
12 Apr 2018 at 17:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chipway commented+1
Comment #2
jpontani commentedThe field is already currently required, it just doesn't show up with an asterisk to make it look required.
If you're registering a logged in user as "Myself", then it just associates the registration with the user's account, which has an email. Same for registering "another account", it associates it to another user's Drupal account. For anonymous registrants, however, the email field becomes a necessity as there is no way to distinguish registrations between anonymous users.
Comment #3
levelos commentedThanks for chiming and clarifying @jpontani.
Comment #4
kclarkson commented@jpontani
So is it possible to give the email filed an asterisk for selecting "other person" ? It nice to have things uniform.
Comment #5
jpontani commentedYou could do a hook_form_alter on the form to set the anon_email field as being required. Just know that by doing so the email is required in all cases. So if the user tries to register as "Myself", the email field won't show but will be required for the form to validate.
Comment #6
kclarkson commentedLet me try to clarify what I am saying.
Currently when an authenticated user registers "other person" (people who do not have a user account) the email field is "not" required.
So in this case we cannot communicate with the actual person who is going to attend the conference if the email field for the participant is not entered.
For most large scale conferences (including drupalcon's and drupalcamps) an administrative assistant is registering/paying for multiple people and is not the individual who needs to receive important communications about the conference.
With this said it would be very helpful if there was an option that allowed us to check a box that says "require email address". If a registered user registers "myself" or "other account" the form should validate because the user profile requires an email address.
This feature would then satisfy both circumstances where maybe a parent is registering a child with no email address, or an administrative assistant who is going to register multiple people with email addresses.
Unfortunately I am not a programmer but am looking at this from a person who organizes various educational conferences.
Comment #7
jpontani commentedWhen registering other email addresses (non user accounts), the email address actually IS required, it just simply doesn't look like it is because there is no asterisk next to it. But in reality, if you try to continue without entering an email or entering an invalid email, it will throw an error saying the email is invalid.
The following code forces a valid email address for an anonymous (no user account) registrant.
In regards to registering non-emailed people (ie: children), there is still discussion being had on how to best handle that.
Comment #8
lsolesen commentedI cannot find the ongoing discussion on how to handle children, though #1473008: Adding user uid and making email optional started out as a discussion regarding that.
Comment #9
choicelildice commentedI wasn't sure where to put this patch, I can create a new issue if this is the wrong one...
I created a patch for commerce_registration which checks the '#required' state before validating the email fields. This allows a developer to simply set the fields to not be required, and you end up with registrations that do not have an email. This obviously creates problems for entity registrations when mass emailing or sending out reminder emails for an event. So, I have created another patch here that simply checks for a blank email field before firing off the emails. This way, it only emails the registrants who have entered an email. I am hoping these patches are a start on an answer for whether emails should be required or not. This way it can be left up to the developer/client.
Let me know if there are issues with this patch, and thanks for the great module.
Comment #10
tmsimont commentedComment #11
tmsimont commentedComment #12
tmsimont commentedrelated is choicelildice's other issue: #1826518: Check whether the email field is required before running it through the validation checks.
I think choicelildice's patches are a good foundation for this feature request, but it only provides a backdoor for a developer to manage. In order to address kclarkson's use case, there would have to be a UI to control a setting for the
#requiredattribute on the email field.Comment #13
choicelildice commentedFound another couple of areas where not having the email address on the registration entity causes issues. The one that I am most concerned about changing is an access check on line 301 in registration.entity.inc. The current module code (before this patch) checks if the anonymous email field has been filled before deeming the registration as anonymous and allowing access. I removed the check for the email address, as I don't see any immediate security implications. The module still goes through all the normal access checks. Please let me know if anyone else sees an issue here.
Comment #14
tstermitzI guess this hasn't been fixed for the big, 7.1.0 release of Jan 2013? I have to type in a fake email when I select "Register for Other Person".
(Speaking of which, please shorten the 'who_is_registering' phrase to "Registration For", or make it configurable. It is way to long for a pretty form.)
The Entity Registrations module presently fails for my use case because I often have one person signing up for two people, where the second person sometimes doesn't have an email (no matter how much I might wish they did!). As pointed out repeatedly, sometimes a parent signs up a kid without an email. I can see the case for requiring the master email to be required, but the email must be optional for secondary registrants.
Despite all this discussion, I can't tell if the problem is about data structure, unique id, or some other interaction.
Comment #15
rerooting commentedPatch in #13 fails against current 1.1 am I missing something? The files seem to have been reorganized...
Comment #16
levelos commentedThis thread, and the patch in #13, are deviating and address multiple issues. Email address is required, that has not changed nor has the patch addressed that systematically in the module. The original issue, the asterik not appearing, is due the business logic behind determining when an email is required. It works as designed.
Comment #17
alan d. commentedMm... Commerce Registration Integration is disabling the #required field :(
Comment #18
alejcerro commented@jpontani is incorrect. The module does not make the email field be required as evidenced by the simple fact that one is able to get past the registration screen without inputting the email field.
The issue that @Alan D references has a patch that actually makes the field required and should be incorporated into the module itself.