# Number Input

### Overview

The **Number Input Web Control** allows App users to input numbers.

![](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-3d838dad4032fb1a72aaf2c70e6a8093db49497b%2Fnumber-input-web-control-v1715-0.png?alt=media)

### Control Properties

#### Placeholder Text

The text displayed to the app user when no text has been inputted. This field expects to return text, by default text not encapsulated by string quotes will have this wrapping implied.

![organizing info](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-c6e250f0de1f39e5550035404050a51330dfc0cd%2Fnumber-input-web-control-v1715-1.png?alt=media)

&#x20;

### Advanced Control Properties

#### Numeral Non Negative

If checked, only allows non negative numbers to be inputted. If unchecked, allows both negative and non negative numbers.&#x20;

#### Percent

Enabling this will divide the raw value of the Number Input by 100.

#### Numeral Thousands Group Style

Adjusts the style of how numbers are formatted with commas on the input.  The default value is 'thousand' where the value of 1000 will be displayed as 1,000.  This setting has no effect on the raw value stored.

#### Numeral Decimal Scale

Adjusts the level of precision of numbers that can be inputted by the number of digits. If the value of 3 is entered, the number of digits that can be entered after the decimal point will be 3. For example, the value of 5.333 could be entered, but not 5.3333.

#### Numeral Integer Scale

Adjusts the scale of numbers that can be inputted by the number of digits. For example, if the value of 4 is set here, the largest number possible will be 9999.

#### Delimiter

Sets the style of the number delimiter.  For example, in many countries, the desired value will be "," which would format 10000 to 10,000.

#### Prefix

Sets a value that is displayed as a placeholder and is affixed to the beginning of the value.

#### No Immediate Prefix

Negates the Prefix setting if set.

#### Raw Value Trim Prefix

Trims the value set within Prefix (if set) at the beginning of the value.  Affects only the raw value stored which is not displayed to the app user.

### Styling

Number inputs can be styled with these controls. For more information, see [Common Style Properties of Web Controls](web-controls-overview/common-style-properties-of-web-controls).

#### Example 1: Controlling what happens with the inputted data

![organizing info](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-585693c603571f9c8ffe49c6f099cee4fd485a91%2Fnumber-input-web-control-v1715-2.png?alt=media)

Data entered into a number input need to be bound to a variable. By default, Airkit automatically creates a Number Variable for the inputted data to be stored, which can be seen within **Inspector > Data Binding**.

In this example, a variable named **number\_input\_1** has been created.&#x20;

#### Example 2: Limiting the inputted values

By default, the largest value that can be inputted is 99,999,999,999.

In the case of entering a person's age, this seems excessive. To ensure the desired data is inputted, limit the **Numeral Decimal Scale** to 0 so that only whole numbers can be entered and set the **Numeral Integer Scale** to 3. It could also be a good idea to set the **Numeral Non Negative** property to TRUE (check the box) to ensure only positive numbers.
