Adding HTML5 Input field types

44 views
Skip to first unread message

jeffatstepup

unread,
Nov 18, 2011, 7:21:43 AM11/18/11
to jQuery dForm
Are there any plans to add the new HTML5 input element types like url,
tel, number etc?

If not I'm happy to look into doing this.

I'm new to dForm so any pointers would be very welcome.

jeffatstepup

unread,
Nov 18, 2011, 8:38:44 AM11/18/11
to jQuery dForm
Ok, so adding the following to dform.subscribers appears to be having
the right effect. Is this the best way to implement this?


text : _element('<input type="text" />'),

//Adding HTML types
number : _element('<input type="number" />'),
url : _element('<input type="url" />'),
tel : _element('<input type="tel" />'),
email : _element('<input type="email" />'),

Daff

unread,
Nov 18, 2011, 12:20:55 PM11/18/11
to jQuery dForm
Exactly. The _element function is dForm.js module specific so you
couldn't access it if you
want to add the types in an external file, but it makes sense to add
that to the core
system. Would we need any fallbacks for browsers that don't support
these fields? I assume
that they will be just displayed as text anyway?
I can add it right away, it would be easier though if you fork on
GitHub, add the
types and make a pull request.

Thanks
Daff

On Nov 18, 6:38 am, jeffatstepup <jeff.ant...@stepupsoftware.co.uk>
wrote:

jeffatstepup

unread,
Dec 1, 2011, 5:43:07 AM12/1/11
to jQuery dForm
Pull request submitted :-)
DISCLAIMER

Step Up Software Limited is registered in England and Wales. Registered office Crowthorne Enterprise Centre, Old Wokingham Road, Crowthorne, Berkshire, RG45 6AW. Company Number 07145650.

This email is intended for the addressee only and may contain information that is privileged and confidential. If you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If this email has been sent to you in error, please notify us immediately by telephone.

Outbound emails are scanned for viruses but the company does not certify that emails are free of viruses or defects.

Reply all
Reply to author
Forward
0 new messages