documentation

Documentation generator: JsDoc Toolkit 2.4.0
Template: Wink 1.0
Generated on:

Class wink.ui.form.Input

Implements a customizable input field. The Input needs properties to define its behaviour. As all other graphical components, it has a getDomNode method that should be used after the instantiation to add the input to the page. The code sample shows how to instantiate a new input and to add it into a webpage.

Class Summary
Constructor Attributes Constructor Name and Description
 
wink.ui.form.Input(properties)
Compatibility
Compatibility list Supported platforms / browsers
iOS2, iOS3, iOS4, iOS5, iOS6, Android 1.5, Android 2.1, Android 2.2, Android 2.3, Android 3.0, Android 3.1, Android 4.0, BlackBerry 6, BlackBerry 7, Bada 1.0, Windows Phone 7.5, Windows Phone 8

Method Summary

Class Detail

wink.ui.form.Input(properties)
var properties =
{
	type: 'tel',
	eraseButton: 1,
	autoCorrect: 0,
	autoCapitalize: 1,
	placeholder: 'type a number',
	width: 150
}

input = new wink.ui.form.Input(properties);

wink.byId('output').appendChild(input.getDomNode());
Parameters:
{object} properties
The properties object
{string} properties.type Optional, Default: text
The type of the field : "text", "password", "number", "tel", "email", "url"
{number} properties.width Optional, Default: 250
The width in pixels of the input field
{number} properties.eraseButton Optional, Default: 1
Display an erase button if set to 1
{number} properties.autoCorrect Optional, Default: 1
Enables the auto correction feature if set to 1
{number} properties.autoCapitalize Optional, Default: 1
Enables the auto capitalization feature if set to 1
{string} properties.defaultValue Optional
The value of the input field
{string} properties.placeholder Optional
The value of the placeholder
See:
Test page

Field Detail

{integer} autoCapitalize
Enables the auto capitalization feature if set to 1
Default Value:
1
{integer} autoCorrect
Enables the auto correction feature if set to 1
Default Value:
1
{string} defaultValue
The default value of the input field
{integer} eraseButton
Display an erase button if set to 1
Default Value:
1
{HTMLElement} inputNode
The input field node
{string} pattern
A pattern to validate the input data
{string} placeholder
The value of the placeholder
{string} type
The type of the field ("text", "password", "number", "tel", "email", "url")
Default Value:
text
{integer} uId
Unique identifier
{number} width
The width in pixels of the input field
Default Value:
250

Method Detail

  • {HTMLElement} getDomNode()
    Returns the dom node containing the input
    Returns:
    {HTMLElement} The main dom node