# Text Box

Capture a text input from a user and pass it through to a script using the click event on a button or link.

You can use a textbox as a single-line input field or as a multi-line field. Use a script to capture the values from this field.

***

{% embed url="<https://www.youtube.com/embed/tmlXJR_DogQ?autoplay=1&rel=0&vq=1080>" %}
*Add a TextBox*
{% endembed %}

***

### Properties

1. **Text**

   This text will be shown in the TextBox when the field loads.
2. **Hint**

   Some placeholder text that will show when the TextBox is empty.
3. **Is Password**

   If you check this checkbox the contents of the TextBox will be masked and not visible to the user, but the value can still be captured in a script.
4. **Read-Only**

   Set to True if you want the control to display as read-only (value can't be changed) on the page.
5. **Validations**

   Validations you can apply to the TextBox.
6. **Visible**

   Set to False if you don't want this control to render on the page and be visible to the user.
7. **Visible Lines**

   Set the height of the TextBox in lines. Password will always be 1, no matter what is set here.

***

### Assigning data to a TextBox

Example:

To display a TextBox containing a specific value retrieved by a SQL query:

1. Use an appropriate [Event](/features/events.md), e.g. *Load* (page) or *Click* (button) to which a [*SetValue* ](/actions/set-value.md)action can be added.
2. Add a [SetValue](/actions/set-value.md) action to assign the field value from the query to the TextBox's *Text* property.

***

### Retrieving data from a TextBox

Properties that can contain data:

* Text

Use an action to capture the values from the control. Go here for more details on how to collect data from controls.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stadium.software/controls/textbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
