{ "id": "60652", "key": "TIMOB-20", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11208", "name": "GA - M1", "archived": true, "released": true } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:50:08.000+0000", "created": "2011-04-15T02:22:37.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:50:08.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Description

\n

The purpose of this API is to create a text field native\ncontrol.

\n

Example

\n
\n\nvar textField = Titanium.UI.createTextField({id:'foo', value:'bar'});\ntextField.addEventListener('change',function(e)\n{\n    e.value // current value of text field\n});\n\n// support return event listener (when return key is clicked)\ntextField.addEventListener('return',function(e)\n{\n   // values are e.value\n});\n
\n

API Arguments - These should apply to TextArea where\napplicable

\n

id : optional. HTML element id for where the\ntext field will be placed if placed in webview

\n

value : optional. initial value of text\nfield

\n

color : optional. text color

\n

backgroundColor : optional. background color of\nfield

\n

enableReturnKey : optional. default is false.\nvalid values are true or false. disable return key when field is\nblank

\n

returnKeyType : optional. valid values are:\nTitanium.UI.RETURNKEY_GO | Titanium.UI.RETURNKEY_GOOGLE |\nTitanium.UI.RETURNKEY_JOIN | Titanium.UI.RETURNKEY_NEXT |\nTitanium.UI.RETURNKEY_ROUTE | Titanium.UI.RETURNKEY_SEARCH |\nTitanium.UI.RETURNKEY_YAHOO | Titanium.UI.RETURNKEY_DONE |\nTitanium.UI.RETURNKEY_EMERGENCY_CALL

\n

keyboardType : optional. valid values are:\nTitanium.UI.KEYBOARD_ASCII |\nTitanium.UI.KEYBOARD_NUMBERS_PUNCTUATION | Titanium.UI.KEYBOARD_URL\n| Titanium.UI.KEYBOARD_NUMBER_PAD | Titanium.UI.KEYBOARD_PHONE_PAD\n| Titanium.UI.KEYBOARD_EMAIL_ADDRESS

\n

autocorrect : optional. default is true. valid\nvalues are true or false. determines if autocorrection is turned on\nfor text

\n

hintText : optional. hint text for a field.\n(this is the placeholder attribute for iphone)

\n

textAlign : optional. default is left. valid\nvalues are: \"left\", \"right\" and \"center\"

\n

clearOnEdit : optional. default is false. clear\ninput field when editing begins

\n

borderStyle : optional. valid values are:\nTitanium.UI.INPUT_BORDERSTYLE_NONE |\nTitanium.UI.INPUT_BORDERSTYLE_LINE |\nTitanium.UI.INPUT_BORDERSTYLE_BEZEL |\nTitanium.UI.INPUT_BORDERSTYLE_ROUNDED

\n

clearButtonMode : optional. valid values are:\nTitanium.UI.INPUT_BUTTONMODE_NEVER |\nTitanium.UI.INPUT_BUTTONMODE_ALWAYS |\nTitanium.UI.INPUT_BUTTONMODE_ONFOCUS |\nTitanium.UI.INPUT_BUTTONMODE_ONBLUR leftButton :\noptional. button to display to the left of the input field

\n

leftButtonMode : optional. valid values are:\nTitanium.UI.INPUT_BUTTONMODE_NEVER |\nTitanium.UI.INPUT_BUTTONMODE_ALWAYS |\nTitanium.UI.INPUT_BUTTONMODE_ONFOCUS |\nTitanium.UI.INPUT_BUTTONMODE_ONBLUR

\n

rightButton : optional. button to display to\nthe right of the input field

\n

rightButtonMode : optional. valid values are:\nTitanium.UI.INPUT_BUTTONMODE_NEVER |\nTitanium.UI.INPUT_BUTTONMODE_ALWAYS |\nTitanium.UI.INPUT_BUTTONMODE_ONFOCUS |\nTitanium.UI.INPUT_BUTTONMODE_ONBLUR

{html}", "attachment": [], "flagged": false, "summary": "API - Titanium.UI.createTextField", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }