> For the complete documentation index, see [llms.txt](https://docs.pixiebrix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pixiebrix.com/developing-mods/developer-concepts/user-input/prompt-for-input.md).

# Prompt for Input

If you only need to collect one field for input, you might consider using the Prompt for Input brick.

### Add the Prompt for Input brick

Search for Prompt for input and add this brick to your mod.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FlWUStHIjKi1Yrlf9YXQz%2Fimage.png?alt=media&amp;token=2995ebd5-bab7-460b-a12e-54fd3d0b3259" alt=""><figcaption></figcaption></figure>

### Configure the message

This brick is very simple. You'll configure a message to appear as a window alert, and there will be an open text field below for the user to provide input.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FUxe8vck1GgTzqHqPg1Zf%2Fimage.png?alt=media&amp;token=7553ce66-1525-4287-8a59-3c2089d77ff0" alt=""><figcaption></figcaption></figure>

### Preview the input prompt

Trigger the mod to view the prompt.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FlIxCAsfwvYjfWJYK7tYq%2Fimage.png?alt=media&amp;token=a4220d1a-233f-4a95-a9ce-76a29eb9f266" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
You might use a Prompt for Input instead of a form if you only need to collect one field and want to require as few clicks as possible. When the Prompt for Input window opens, the cursor will be set to the field so you won't have to click or tab to set text and submit.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/user-input/prompt-for-input.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
