Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #26 from jeffatstepup/master
Browse files Browse the repository at this point in the history
Adding HTML5 Input field types
  • Loading branch information
David Luecke committed Dec 1, 2011
2 parents 938706f + 30f24f9 commit 80f25d5
Showing 1 changed file with 85 additions and 1 deletion.
86 changes: 85 additions & 1 deletion src/dform.subscribers.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,91 @@
* }
* (end)
*/
file : _element('<input type="file" />')
file : _element('<input type="file" />'),
/**
* type: number
*
* Defines a field for entering a number (HTML5)
*
* Parameters:
* options - The options this element should be created with
*
* Returns:
* An input element with type number
*
* Example:
* (start code)
* {
* "type" : "number",
* "name" : "quant",
* "caption" : "quantity",
* }
* (end)
*/
number : _element('<input type="number" />'),
/**
* type: url
*
* Defines a field for entering a URL (HTML5)
*
* Parameters:
* options - The options this element should be created with
*
* Returns:
* An input element with type url
*
* Example:
* (start code)
* {
* "type" : "url",
* "name" : "mywebsite",
* "caption" : "Website URL",
* }
* (end)
*/
url : _element('<input type="url" />'),
/**
* type: tel
*
* Defines a field for entering a telephone number (HTML5)
*
* Parameters:
* options - The options this element should be created with
*
* Returns:
* An input element with type tel
*
* Example:
* (start code)
* {
* "type" : "tel",
* "name" : "phone",
* "caption" : "Contact Phone Number",
* }
* (end)
*/
tel : _element('<input type="tel" />'),
/**
* type: email
*
* Defines a field for entering an e-mail address (HTML5)
*
* Parameters:
* options - The options this element should be created with
*
* Returns:
* An input element with type email
*
* Example:
* (start code)
* {
* "type" : "email",
* "name" : "contactemail",
* "caption" : "Contact e-mail",
* }
* (end)
*/
email : _element('<input type="email" />')
});

$.dform.subscribe(
Expand Down

0 comments on commit 80f25d5

Please sign in to comment.