Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
forms system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 May 2007 at 05:01 UTC
Updated:
29 Jul 2014 at 17:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
moshe weitzman commentedgood idea ... lets actually use the element in admin site settings, registration, profile edit, ...
Comment #2
dries commentedGreat idea and but as Moshe said: let's use it in core wherever we can. :)
(Also, we write 'mail' instead of 'email' elsewhere.)
Comment #3
hunmonk commentedokay, as requested, i've used the form element in all appropriate core places i could think of. i was hesitant to use it for user email validation, as it looked to me like the user module validation API stuff could be called programmatically as well. if we decide that it's safe to use there, it would be trivial to add.
also ran some tests on it at the site config page, and it works as advertized. note that there are some variable warnings on that page, but further investigation revealed that they were there before this patch as well, so they should be cleaned up in another patch i think...
Comment #4
Stefan Nagtegaal commentedEhm, can we add some jQuery goodness so the new mail formitem get's automagically validated when the user tabs/leaves the field?
A nice green mark when it's okay, and error messages in red when it's not?
Comment #5
hunmonk commented@Stefan Nagtegaal: not that i disagree with with the usefullness of your request, but that is major scope creep for this patch... :)
Comment #6
eaton commentedThere are a couple of notices that are thrown on comment preview, but they appear to occur even without the patch. Looks like it works, and could make things simpler for people wanting to collect email addresses.
I'm a bit concerned about the possible element namespace explosion if we begin making custom element types for what are, essentially, distinct validations of generic text fields, but email addresses may be common enough to merit a special case.
Comment #7
hunmonk commentedi still think this is a good idea, but i'm not going to carry the ball on it anymore...
Comment #8
catchNo longer applies, moving to D7.
Comment #9
TapocoL commentedAn idea I get from this is to give an option of a duplicate text field that is checked to match the first field. Here is an example:
will output two text fields for Email Validated fields with the second field only being used as a confirmation that it matches the first one. I see the double-entry emails on many sites, and figure that it could have it's place here as well.
Comment #10
drewish commentedsubscribing...
Comment #11
robloachJust a quick note that I think this is a good idea. Would be good to consider multiple email addresses too (like in the contact module's recipients).
Comment #12
Jaza commentedMoving.
Comment #13
valthebaldI think this should be closed as a duplicate of (fixed) #1174620: Add new HTML5 FAPI element: email
Comment #14
yoroy commentedGreat, lets do that :)