Closed richardhj closed 7 years ago
I don't think that's something we should regex into the page. An email type field should first be part of Contao core so we can re-use it. I know the form generator does use set a text field to type number
if regex is set to digits only, does that maybe already happen for email fields?
The textfield widget class sets type="email"
by it's rgxp too (see FormTextField@L154
). Adding this rgxp to the username's dca would make it for the majority of modules.
The problem with the login form is that the input type is hardcoded (see mod_login_Xcl
). So, as far as I can see, the only possibility is modifying the template while parsing.
Alternatively, all we can do is to make a recommendation for using a custom template.
Maybe we should just write that into the README?
IMO we should add the rgxp to the dca and add it to the README as the login form will not be influenced by the rgxp.
I have update the rgxp of tl_member.username
, though I don't think that will have any impact because the field is disabled anyway. I suggest you open an issue on contao/core to support this behavior in the frontend login module.
Mobile devices (e.g. iOS) are very uncomfortable for entering a mail address in a
input type="text"
(automatic ucfirst, wrong keypad and so on). It would be nice to force ainput type="email"
. I suggest:Do you approve at all? Should we check for a xhtml-template?