> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Text input

- URL: https://getpublii.com/dev/text-input/
- Published: 2019-03-23T13:56:51.632Z
- Updated: 2024-02-09T08:54:08.507Z
- Description: Text input is the default field type which is used if the specified field type does not match the other available fields. It will display…
- Author: Tomasz Dziuda
- Tags: Fields, Theme Settings API

Text input is the default field type which is used if the specified field type does not match the other available fields. It will display the standard input field.

The most straightforward text input field syntax is as follows:

```json
{
    "name": "fieldName",
    "label": "Field name",
    "group": "Group name",
    "value": "default value",
    "type": "text",
    "disabled": false
}
```

![Text Input](https://getpublii.com/dev/media/posts/110/text-input.svg)

If you will use a type value which does not match other fields types, that value will be used as a type attribute in the rendered input HTML element.

That allows you to create fields like "number", "hidden", "email", "www" etc.

## Custom parameters

The text input field supports few other parameters compliant with the HTML input element syntax:

-   min
-   max
-   size
-   step
-   pattern
-   placeholder

Also, there is available an additional parameter that allows creating a short description of the text input field:

-   note

#### Example:

```json
{
    "name": "pageWidth",
    "label": "Page width",
    "group": "Layout",
    "value": "63rem",
    "note": "Use of „rem” units recommended; also use others (px, vw)",
    "type": "text"
}
```

![Text input](https://getpublii.com/dev/media/posts/110/text.svg)
