# Secure String Input

### Overview

The **Secure Text Input** collects information from a user kept in a secure source. The client-side code cannot access this data. To retrieve the data, you must use the [Secure Value Retrieval](../data-operations/the-secure-value-retrieval-data-operation) data operation and pass the RedisKey . The Secure Text input is ideal for collecting sensitive user information like Social Security Numbers or Credit Card Information. Using a Secure Text Input prevents the front-end environment from having access to the value the user has entered.

![SecureApp-SecureString-Input.png](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-5aace90ef8fc1fad88e18ff457f42840b660decc%2Fsecure-text-input-web-control-v1715-0.png?alt=media)

### Control Properties

#### Placeholder Text

Text to be displayed in the text input until the user enters the box.

#### Maximum Length

Determines the maximum number of characters that the input will allow.

#### Expiration Duration

Determines the for how long the secure string will be available. Options are:

* in minutes
* in hours
* in days

#### Input Mode

Determines the mode of the keyboard for a mobile device.

* **text** - (default) allows all text from a standard keyboard.
* **decimal** - allows for numbers with decimals to be entered.
* **numeric**- allows for numbers to be entered.
* **tel**- for inputting telephone numbers.
* **search**- for search inputs, the enter button the keyboard will change to "search"
* **email** - for email addresses
* **URL** - for entering a web URL.

These are the same standard inputs as any text input.

#### Format

Determines how the text will be rendered. For example, selecting the date format and **dd/mm/yyyy** will cause the input to format a data as "04/04/2044."

#### Delimiter

Character, or sequence of characters, used to separate values in the input. When a user enters this character into the secure input, it will be ignored.

#### Prefix

Base string that is part of any input entered into this box. This value is stored as part of the input the user enters by default.

#### No Immediate Prefix

If enabled, the prefix will not be a part of the input until the user enters a character into the input.

#### Raw Value Trim Prefix

If enabled, the prefix will be trimmed from the value stored in the secure string output.

#### Right Icon

Displays the icon at the right of the input. Default is `password-visibility`. If another icon is chosen, the user won't be able to toggle between hidden and shown visibility.

#### AutoComplete

Determines the autocomplete mode for the input. Check out [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for more details on what options are available.

### Control Actions

#### Value Changed

This occurs every time a character is added or removed from the Secure Text Input. Because the Secure String does not have a control value binding property, the `event.value` will contain the information needed to retrieve the text entered.

In order to retrieve the RedisKey, set a variable on the Value Change action to

```javascript
event.value
```

#### On Enter

Fired when the user hits the enter or submit button at the end of the input.

### Styling and Theming

Secure String Input has the same styling for all text input controls.

#### Example 1: Password Input

A Scure String Input can collect a password to log into an app.

![SecureApp-SecureString-Input.png](https://1191388742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhOn9CLWoV9VfJeM5EDAa%2Fuploads%2Fgit-blob-5aace90ef8fc1fad88e18ff457f42840b660decc%2Fsecure-text-input-web-control-v1715-0.png?alt=media)

Insert a Secure Text Input. Map the `event.value` to an activity variable.
