Default Login method using email not HTML5 ready?

60 views
Skip to first unread message

Jim S

unread,
Jan 29, 2014, 10:41:37 AM1/29/14
to web...@googlegroups.com
I have an app that is using the standard web2py login with NO username.  Therefore people login with an email address.  When the INPUT element gets created for the email address on the login form, the type is set to "text".  Can we get that changed to "email" so keyboards on tablets/phone will present the @ key on the default keyboard for that field?

Or, am I missing something....

-Jim

Niphlod

unread,
Jan 29, 2014, 3:08:05 PM1/29/14
to web...@googlegroups.com
there are no HTML5 widgets whatsoever in web2py right now.

Jim Steil

unread,
Jan 29, 2014, 3:10:52 PM1/29/14
to web...@googlegroups.com
Is there a plan to add it?  Anything I can do to help?

-Jim


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/JH52SZQK9A4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Paolo Valleri

unread,
Jan 29, 2014, 5:15:18 PM1/29/14
to web...@googlegroups.com
You should customize the widget, try something like:


db.auth_user.email.widget = lambda f,v: SQLFORM.widgets.string.widget(f, v, _placeholder='Email', _type='email')


Paolo

Jim Steil

unread,
Jan 29, 2014, 9:44:28 PM1/29/14
to web...@googlegroups.com
Perfect!  Just what I was looking for, thanks for the help.

-Jim

Cliff Kachinske

unread,
Jan 30, 2014, 12:51:11 PM1/30/14
to web...@googlegroups.com
Jim,

I've been playing with HTML5 myself a bit.

Not all browsers implement the input type completely, so be sure to test it in different browsers.

Jim Steil

unread,
Jan 30, 2014, 3:19:09 PM1/30/14
to web...@googlegroups.com

Right,  but they all fail back to type="text" if they don't support the new types so they're would be no harm.

Jim

--
Reply all
Reply to author
Forward
0 new messages