> For the complete documentation index, see [llms.txt](https://docs.gmetri.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gmetri.com/metaverse/build/variables/capturing-user-input.md).

# Capturing User Input

### Adding Capture User Input Element

To capture information entered by the viewer, you can add the 'Capture Input' element from the 'Add Element' menu.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2FePPE9K0Qv0pmdwjFIzJH%2Fimage.png?alt=media&#x26;token=5bd244a4-2f65-4ce6-8bba-59f344e1bf39" alt=""><figcaption><p>Capture Input Element</p></figcaption></figure>

You can customize the Capture Input element in the Properties Panel - you can update the input's placeholder, min and max length to be entered by the viewer.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2FPhyPe6f4YC1ecNv5fhFP%2Fimage.png?alt=media&#x26;token=23ab5055-90c3-4552-a382-28347c0facda" alt=""><figcaption><p>Capture Input setting panel</p></figcaption></figure>

### Add Rules to activate it

You need to create rules to collect the data entered by the viewer.

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2Fvhrt6a44jJHoLQvICCmS%2Fimage.png?alt=media&#x26;token=44db7da8-6a40-4960-9df2-e5d001f58cee" alt=""><figcaption><p>Rules - Boolean Variables</p></figcaption></figure>

### Viewer Screen

Here is how it looks to the viewer:

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2FDmSuOnC1FTx4rGJWUXws%2Fimage.png?alt=media&#x26;token=e87e6aea-02f4-4576-883e-5c51ac7444c4" alt=""><figcaption><p>Capture Input front end</p></figcaption></figure>

### Example Experience

{% embed url="<https://rnghud.gmetri.com/string_variables>" %}
Capturing User Input
{% endembed %}

These are the rules used in the above experience:

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgll1jjQMRTVj7p6n7g%2Fuploads%2FSIufbBLv4LHuHKHqIB9h%2Fimage.png?alt=media&#x26;token=be8f8480-f796-457d-b366-cd79db44da9f" alt=""><figcaption><p>Rules - Capture Input into String Variable</p></figcaption></figure>

a


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.gmetri.com/metaverse/build/variables/capturing-user-input.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
