Skip to main content

getText()

returns the text value of the input with the applied mask

getText(): string;

Returns:

A string with the text with the applied mask

Example

const input = form.getItem("input");
input.setValue(1000.01);

input.getValue(); // 1000.01 for the input type number
input.getValue(); // "1000.01" for the input type string

input.getText(); // "1,000.01" with the applied numberMask/patternMask

The method is used with the numberMask and patternMask properties of the Input control. It allows getting the value with the applied mask.

Change log:

Added in v9.0

Related: Getting the text value of an input