# Show a Modal or Sidebar Form

Forms are exactly what they sound like, items that you can configure with varying field types to capture information. You could do many things with that information, such as sending it to another app (*with an HTTP request*), inject it onto the page (*setting input values*), or even save it to a [PixieBrix database](/storing-data-with-team-databases.md) to reference again later.&#x20;

### Add the Form brick to your mod

Use the [Show a modal or sidebar form brick](https://www.pixiebrix.com/marketplace/78fe8f15-dd68-40d1-bc5f-e5b992820bf1/?utm_source=pixiebrix\&utm_medium=page_editor\&utm_campaign=docs\&utm_content=view_docs_link), or use the Custom Form brick if you're adding a form within a sidebar.&#x20;

### Define information about the form

At the top of the brick you'll be able to specify the title of the form, and a description if desired.

<figure><img src="/files/PMQ6YVgdk2oLZNWAMLG5" alt=""><figcaption></figcaption></figure>

### Create and configure a field

Below, you can configure information about specific fields and add or remove existing fields.

<figure><img src="/files/kjYi18wTzzAwueEO3Fdu" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Pro tip: Use output from previous bricks to define Default values. For instance, if you're trying to collect a link, you could default a field to `@input.url` and the current URL would appear. A user can still override that and change the data when completing the form, so this is helpful for presetting information that requires human verification.
{% endhint %}

### Configure submission information

Below a field you'll see a few additional options that apply to the entire form. You can specify if the form can be canceled, text for the submit button, and specify the location of the modal.

<figure><img src="/files/ku7Xt4g4epJF2jGhUfil" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Custom Forms in sidebars have additional properties, such as being able to Autosave and save the data to a [team database](/storing-data-with-team-databases.md) or [page state](/developing-mods/developer-concepts/variables-and-data-context/advanced-using-page-state.md).
{% endhint %}

### Viewing your form

When you run your mod, a nice form appears in the sidebar or modal, depending on where you configured it.&#x20;

<figure><img src="/files/RwufYGWkUtZRKCnqT7ad" alt="" width="375"><figcaption></figcaption></figure>


---

# 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.pixiebrix.com/developing-mods/developer-concepts/user-input/show-a-modal-or-sidebar-form.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.
