# Input fields

A field writes what was entered into a variable. Its name is set in the "Variable" field — after that the value is inserted into texts and goes to lists, requests and conditions. More on the [App data](https://support.watbot.org/mini-apps/data#variables) page.

How to add elements and what they have in common is on the [Screen elements](https://support.watbot.org/mini-apps/elements) page.

| Element | What is entered |
|---|---|
| ["Input"](https://support.watbot.org/mini-apps/elements/fields/input) | One line: text, number, phone, email, date |
| ["Multiline input"](https://support.watbot.org/mini-apps/elements/fields/textarea) | Long text |
| ["Select"](https://support.watbot.org/mini-apps/elements/fields/select) | One of the given options |
| ["Switch"](https://support.watbot.org/mini-apps/elements/fields/switch) | Yes or no |
| ["Slider"](https://support.watbot.org/mini-apps/elements/fields/range) | A number on a scale |
| ["Star rating"](https://support.watbot.org/mini-apps/elements/fields/rating) | A rating in stars |
| ["Date and time"](https://support.watbot.org/mini-apps/elements/fields/datetime) | A date, time or month in a calendar |

A tap on a field is not an exit. To send what was filled in, put a [button](https://support.watbot.org/mini-apps/elements/basic/button) under the fields and draw a link from it — for example, to the "Add a record" or "HTTP request" block.

## Shared settings

- **"Variable"** — where the entered value goes.
- **"Label"** and **"Label placement"**: "Above", "Floating", "Left, fixed width", "Left", "Right". The switch and the slider have no "Floating".
- **"Placeholder"** — grey text in an empty field: for the input, multiline input and select.
- **"Default value"**. You can insert a variable here — this way the field is filled with the value of a found record.
- **"State"**: "Read only" (for the input and multiline input), "Disabled".
- **"Filling"**: "Outline", "Solid", "None" and the "Round" tick — for the input, multiline input and select. The border and the fill work only on Android.

Several selected options or dates go into the variable as one comma-separated string.

## Validation

"Input", "Multiline input" and "Select" have a "Validation" section:

- "Helper text";
- "Error text" — shown instead of the helper text when the value fails validation: a required field, length, format;
- "Length: from and to" and "Show the character counter" — for the input and multiline input;
- for the input — "Limits and step" for numbers and dates and "Pattern (regular expression)";
- "Required field".

Fields that should become a list record right away are easier to build with a ["Record form"](https://support.watbot.org/mini-apps/elements/records/form): it has its own validation on the server.
