# Currency Input

### Overview

The Currency Input Web Control collects numbers according to the format of the selected currency. Numbers are stored using a Variable of type [Currency](../variable-data-types/the-currency-variable-data-type).

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

### Control Properties

#### Placeholder Text

Displays the text in the input’s box before the user starts typing. By default, this text only shows if the No Immediate Prefix in Advanced Property is checked.

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

### Advanced Control Properties

#### 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 entered 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, the largest number possible will be 9999.

#### Prefix

Sets the Value that is displayed in the input box and is affixed before the number.

#### Currency Code

Displays a list of currency codes to choose from.This property gets bound to the Data Binding Value when the state of the control changes.

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

#### No Immediate Prefix

Disables the Prefix setting, if set, and shows Placeholder Text, if any.

#### Raw Value Trim Prefix

Trims the Value that was set in Prefix before the number. It only affects the raw Value stored, which is not displayed to the app user.

#### Right Icon

Allows the display of icons on the right of the input box. The default option “country”, shows the “US” Value.

#### AutoComplete

Determines whether the user's device is allowed to autocomplete the field. Guidance can be provided to the app user's browsing environment by using one of the predetermined autocomplete options.

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

**Data Binding**

**Value**

By default, this Data Binding property auto-generates a Variable of type [Currency](../variable-data-types/the-currency-variable-data-type) at the Web Page level to store the data from the input. Users can also edit the Data Binding property and create their own Variables.

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

### Style and Theming

This component has Style Variants for the following states:

* Default - When first rendered without a state.
* Focused - When the Currency Input is focused.
* Disabled - When the Currency Input is disabled.

Most Web Controls have a common [set of styling properties](web-controls-overview/common-style-properties-of-web-controls).

### Control Actions

In the Actions Tab of the Inspector section, the Currency Input actions can be defined.

**On Blur**

Triggers when the user leaves the input field. That is, when changing the focus from the field to some other part of the application.

**Value Changed**

Triggers with each entered number. That is, Value changes every time a key is pressed, unlike a [Checkbox](checkbox-web-control), where its Value changes when the box is selected.

**On Enter**

Triggers upon pressing Enter.

Please check out [Action Builder](../studio/action-builder) to find all the available actions.

### Advanced

In the Advanced Tab of the Inspector section, the conditions under which this Web Control is visible can be defined by setting a specific parameter.

**Is Visible**

This property is a conditional field, which allows to show or hide the field depending on whether the set condition is met. The condition will always evaluate to a [Boolean](../variable-data-types/the-boolean-variable-data-type).

**Is Disabled**

This property is a conditional field, which allows to enable or disable the field depending on whether the set condition is met. The condition will always evaluate to a Boolean.

### Example 1:

In this example, a Currency Input is set for app users to enter how much they want to donate to a pet shelter.

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