TrophyCustomer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

Interface: IInputTextConfig

Provides properties for an input field.

You can use these properties in params of the AuWidgetInputText class.

{
  "widgets": [
    {
      "name": "quantity",
      "title": "Quantity",
      "type": "input-text",
      "params": {
        "defaultValue": "{{ order.quantity }}",
        "placeholder": "Quantity",
        "type": "number",
        "min": "1"
      }
    }
  ]
}

Hierarchy

  • IInputTextConfig

Index

Properties

Properties

Optional defaultValue

defaultValue? : string | number

The default value of the widget, either a string or number. By default, this is an empty string.


Optional isNumber

isNumber? : boolean


Optional isTextArea

isTextArea? : boolean

If true, enables a text area instead of single-line text. The default value is false.


Optional label

label? : string

A label of the widget. By default, this is an empty string.


Optional max

max? : number

The max value for the number type. The default value is 999999.


Optional maxLength

maxLength? : number

The max text length.


Optional min

min? : number

The min value for the number type. The default value is -999999.


Optional onChange

onChange? : Function | Array‹Function›

A function ("{{#function <expression>}}") or an array of functions. This event triggers when the user changes the text in the widget.


Optional pattern

pattern? : string

A regular expression to limit input.


Optional patternFlags

patternFlags? : string


Optional placeholder

placeholder? : string

A string that is displayed as a hint. By default, this is an empty string.


Optional prompt

prompt? : string

_Deprecated, use placeholder instead. By default, this is an empty string.


Optional rows

rows? : number

The widget height in rows if the text area mode is on. The default value is 2.


Optional supportText

supportText? : string

An optional string. By default, this is an empty string.


Optional type

type? : string

The widget type, either "number" or "text". The default value is "text".


Optional value

value? : string | number

The current value of the widget if it's used for entering text.