Type String Object TextField Library native.* Revision Current Public Release (2017.3068) Keywords keyboard, keyboard type, text input, text field, native text
Sets the keyboard type for a native text input field.
Possible string values are:
"default"— the default keyboard, supporting general text, numbers and punctuation.
"number"— a numeric keypad.
"decimal"— a keypad for entering decimal values.
"phone"— a keypad for entering phone numbers.
"url"— a keyboard for entering website URLs.
"email"— a keyboard for entering email addresses.
"no-emoji"— the default keyboard, supporting general text, numbers and punctuation but does not allow emoji to be typed.
The following values are iOS-specific and correspond to the names of actual constants in the iOS API:
Please consult the iOS documentation on UIKeyboardType for an explanation of each keyboard type.
To create an obscured password entry field, set the object.isSecure boolean property to
The Corona Simulator and desktop apps do not support the
"email" input types.
Some operating systems permit the user to paste text which includes emoji even though they can't be typed.
Note that "emoji" is narrowly defined to be the multi-byte character entities that cause issues with some APIs (e.g. "smiley face"). Some operating systems include characters on their "emoji keyboards" which are just symbols that are basic Unicode.
local numericField = native.newTextField( 50, 150, 220, 36 ) numericField.inputType = "number"