• References
    • Main
    • RenderKit
    • LibJS
    • Canvas
  • Components
    • Overview
    • Page
    • Basic
      • Rectangle
      • Text
      • Button
      • HTML Article
      • Toggle Button
      • Tiler
      • Web View
      • Image Zoomer
    • Navigation
      • Carousel
    • Forms
      • Form
      • Text Entry
    • Layout
      • Group
  • Web API
  • Tutorials
  • Contact
Menu
  • References
    • Main
    • RenderKit
    • LibJS
    • Canvas
  • Components
    • Overview
    • Page
    • Basic
      • Rectangle
      • Text
      • Button
      • HTML Article
      • Toggle Button
      • Tiler
      • Web View
      • Image Zoomer
    • Navigation
      • Carousel
    • Forms
      • Form
      • Text Entry
    • Layout
      • Group
  • Web API
  • Tutorials
  • Contact
Umajin Developer > Components > Text Entry

Text Entry Component

Check out the standard help for an overview of the text entry component.

API Examples

// Internally the component is known as "text_entry"
var text_entryComponent1 = findComponent("My Page", "text_entry", "MyTextEntry"); // To retrieve a text_entry component called "MyTextEntry" on a page called "My Page"
var text_entryComponent2 = findComponentInForeground("My Foreground", "text_entry", "MyTextEntry"); // To retrieve a text_entry component in the foreground.
var text_entryComponent3 = createComponent(parentComponent, "text_entry", 0, 0, 100, 100); // to create a text_entry component inside a custom component.
 
// Retrieving a property
var textOnTextEntry = getProperty(text_entryComponent1, "text");
console.log(textOnTextEntry);
 
//Setting a property
setProperty(text_entryComponent1, "text", "hello world");

Properties

See the shared property list for all properties available for this component.

Properties

See the shared property list for all properties available for this component.

PropertyTypeDescription
enabledboolEnable / Disable the component
entry_typestring‘default’
‘phone_number’
’email’
‘url’
‘password’
‘number’
empty_textstringThe text displays when the text is empty.
slice_top, slice_bottom
slice_left, slice_right
number(Pixels)Used to preserve the edges of an image when resizing.
To quickly find optimal slice values, place a component using the editor and choose ‘Edit Values’.
border_scalenumberProportionally scales the sides, edges and corners of the nine slice image that are set in the editable values of the image used as a base for the component.
multilineboolDefault is false.
required_fieldboolDefault is false. Form validation Will be failed when the text is empty
validation_typenumber0 – none (default)
1 – phone number  regex(‘(\\(\\d{2}\\))?\\d{6,7}’) || regex(‘\\+?\\d{7,14}’)
2 – email
3 – number
4 – custom regex
validation_regexstringRegex to validate the text
font_colorstring(0x000000 – 0xFFFFFFFF)A Hex string in the form of RGBA (Red, Green, Blue, Alpha). E.g 0xFF0000FF will be red with 100% opacity.
font_sizenumber (> 0)The size of the font. Decimal values are allowed.
font_filenamestringThe filename of a font inside the /fonts folder (e.g vera.ttf). If the font isn’t found the text will disappear.
trackingnumberDistance between characters.
empty_font_colorstring 
empty_font_sizenumber 
empty_font_filenamestring 
empty_trackingnumber 
textstringThe text of component
default_filenamestringBackground image when the component is in normal status
disabled_filenamestringBackground image when the component is in disable status
resize_type  
font_align  
empty_font_align  

Events

See the shared event list for all events available for this component.

EventParamsDescription
on_focus  
on_typing  
on_tab  
on_enter  
on_before_validation  
on_fail_validation  
on_pass_validation  
  • Developer Home
  • Umajin Home
  • Support Home
Menu
  • Developer Home
  • Umajin Home
  • Support Home