Search.../

TextInput

An input element for capturing small amounts of text. Learn more.

Guides

Additional information about this section

Properties

Store values associated with an object

  • collapsed

    Indicates if the element is collapsed or expanded.

  • enabled

    Indicates if the element is enabled or disabled.

  • global

    Indicates if an element appears on all pages or only on the current page.

  • hidden

    Indicates if the element is visible or hidden.

  • id

    Gets the element's ID.

  • inputType

    Sets or gets the input type of an Input element.

  • isVisible

    Indicates if the element is actually visible.

  • max

    Sets or gets the maximum value for a text input element whose type is set to Number.

  • maxLength

    Sets or gets the maximum number of characters that can be entered.

  • min

    Sets or gets the minimum value for a text input element whose type is set to Number.

  • parent

    Gets the element's parent element.

  • placeholder

    Sets or gets the element's placeholder text.

  • readOnly

    Sets or gets if a user can modify the value of the input element.

  • rendered

    Indicates if an element is currently in the DOM structure.

  • required

    Sets or gets whether an input element is required to have a value.

  • style

    Gets an object containing information about the text input's styles.

  • type

    Gets the element's type.

  • valid

    Indicates if an input element's value is valid.

  • validationMessage

    Gets a message indicating why the element is invalid, or an empty string if the message is valid.

  • validity

    Gets a ValidityState object that contains detailed information about the validity states of the element.

  • value

    Sets or gets a text input's value.

Functions

Perform actions on an object

  • blur( )

    Removes focus from the element.

  • collapse( )

    Collapses the element and sets its collapsed property to true.

  • disable( )

    Disables the element and sets its enabled property to false.

  • enable( )

    Enables the element and sets its enabled property to true.

  • expand( )

    Expands the element and sets its collapsed property to false.

  • focus( )

    Places focus on the element.

  • hide( )

    Hides the element and sets its hidden property to true, using an effect if specified.

  • onBlur( )

    Adds an event handler that runs when the element loses focus.

  • onChange( )

    Adds an event handler that runs when an input element's value is changed.

  • onClick( )

    Adds an event handler that runs when the element is clicked.

  • onCustomValidation( )

    Adds an event handler that runs when the element's validation is checked.

  • onDblClick( )

    Adds an event handler that runs when the element is double-clicked.

  • onFocus( )

    Adds an event handler that runs when the element receives focus.

  • onInput( )

    Adds an event handler that runs when the input element receives input.

  • onKeyPress( )

    Adds an event handler that runs when the cursor is inside the input element and a key is pressed.

  • onMouseIn( )

    Adds an event handler that runs when the mouse pointer is moved onto the element. Deprecation note: The $w parameter of event handlers is being deprecated. To ...

  • onMouseOut( )

    Adds an event handler that runs when the mouse pointer is moved off of the element. Deprecation note: The $w parameter of event handlers is being deprecated. ...

  • onViewportEnter( )

    Adds an event handler that runs when an element is displayed in the viewable part of the current window.

  • onViewportLeave( )

    Adds an event handler that runs when an element is no longer displayed in the viewable part of the current window.

  • resetValidityIndication( )

    Resets the element's visual validity indication.

  • scrollTo( )

    Scrolls the page to the element using an animation.

  • show( )

    Shows the element and sets its hidden property to false, using an effect if specified.

  • updateValidityIndication( )

    Updates the element's visual validity indication based on its current validity state.