# Text

## Specification

### tags

* Type: `String`
* Specifies how to treat HTML tags.

Allowed values:

<table><thead><tr><th width="193.5555419921875" valign="top">Value</th><th valign="top">Specification</th></tr></thead><tbody><tr><td valign="top"><strong>strip</strong></td><td valign="top">Removes HTML tags.</td></tr><tr><td valign="top"><strong>stripall</strong></td><td valign="top">Removes all HTML tags (including unclosed).</td></tr><tr><td valign="top"><strong>escape</strong></td><td valign="top">Converts <code>&#x3C;</code> , <code>></code> and <code>&#x26;</code> to HTML entities.</td></tr></tbody></table>

### validate

* Type: `Object`
* Specifies parameter validation.

Available parameters:

<table><thead><tr><th width="139.5555419921875" valign="top">Parameter</th><th width="126.4444580078125" valign="top">Type</th><th valign="top">Specification</th></tr></thead><tbody><tr><td valign="top"><strong>max</strong></td><td valign="top">number</td><td valign="top">Specifies the maximum length.</td></tr><tr><td valign="top"><strong>min</strong></td><td valign="top">nNumber</td><td valign="top">Specifies the minimum length.</td></tr><tr><td valign="top"><strong>pattern</strong></td><td valign="top">string</td><td valign="top"><p>Specifies a RegExp pattern that a text parameter should conform to. </p><p>In most cases, the pattern has to be wrapped in <code>^</code> and <code>$</code> e.g. <code>^[a-z]+$</code> in order to validate the whole input, not just a part.</p></td></tr></tbody></table>

### nested

Available types:

<table><thead><tr><th width="126.77777099609375" valign="top">Type</th><th valign="top">Specification</th></tr></thead><tbody><tr><td valign="top"><strong>array</strong></td><td valign="top">Provides an array of nested parameters that are shown when the value of the parameter is set (value is not empty).</td></tr><tr><td valign="top"><strong>string</strong></td><td valign="top">Provides the URL address of an RPC to load a list of nested parameters.</td></tr><tr><td valign="top"><strong>object</strong></td><td valign="top">Provides a detailed specification of nested parameters.</td></tr></tbody></table>

{% tabs %}
{% tab title="Use of nested fields" %}

```javascript
{
    "name": "myText",
    "type": "text",
    "label": "My Text",
    "nested": "rpc://getNestedFields"
}
```

{% endtab %}
{% endtabs %}

## Examples

### Basic text field

A basic text input.

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-7c24605df86e799185ac853b90f29b70958f02da%2FScreen%20Shot%202022-08-31%20at%2018.49.23.png?alt=media" alt="" width="545"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```javascript
[
	{
		"type": "text",
		"label": "Name",
		"name": "name"
	}
]
```

{% endtab %}
{% endtabs %}

### Strip HTML tags

Enable HTML tags stripping or escaping using the `tags` option.

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-3b00c9671a7c645285b46dce4f6c830f9cb947f8%2FScreen%20Shot%202022-08-31%20at%2018.54.30.png?alt=media" alt="" width="556"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```javascript
[
	{
		"type": "text",
		"label": "Stripped field",
		"name": "stripped",
		"tags": "strip"
	},
	{
		"type": "text",
		"label": "Escaped field",
		"name": "escaped",
		"tags": "escape"
	}
]
```

{% endtab %}

{% tab title="Output" %}
**Stripped field**

```
Hello world
```

**Escaped field**

```
&lt;h1&gt;Hello world&lt;/h1&gt;
```

{% endtab %}
{% endtabs %}

### Validate length

Control the length of the inserted string value by setting `validate.max` and `validate.min` .

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-e3feba0673786bef55be03f6fad46ba4e2710036%2FScreen%20Shot%202022-08-31%20at%2018.56.26.png?alt=media" alt="" width="537"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```javascript
[
	{
		"type": "text",
		"label": "Validated string",
		"name": "validated",
		"validate": {
			"max": 32,
			"min": 10
		}
	}
]
```

{% endtab %}
{% endtabs %}

### Validate pattern

Use a regular expression to validate the text input.

{% tabs %}
{% tab title="Appearance" %}

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-5171486a631e3abc1ac719b20e6d7462e140f76c%2FScreen%20Shot%202022-08-31%20at%2018.57.34.png?alt=media" alt="" width="548"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```javascript
[
	{
		"type": "text",
		"label": "Validated string",
		"name": "validated",
		"validate": {
			"pattern": "^[A-Z ]+$"
		}
	}
]
```

{% endtab %}
{% endtabs %}

### Search button

Add an [RPC button](https://developers.make.com/custom-apps-documentation/app-components/rpcs/dynamic-fields-rpc) (also called as a search button) to perform an RPC call inside the field. Usually used to find an ID of a specific item.
