> For the complete documentation index, see [llms.txt](https://klassdocs.gitbook.io/klassapp-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://klassdocs.gitbook.io/klassapp-documentation/design/system/components/forms/formgroup.prompt.md).

# FormGroup.prompt

Label + control + error/help in one block — the only form primitive KlassApp ships; every field in every wizard and settings screen is one of these.

```jsx
<FormGroup label="Student name" name="student_name" required placeholder="e.g. Nakato Sarah" />
<FormGroup label="Class" name="class" type="select" options={{ s1: 'Senior 1', s2: 'Senior 2' }} placeholder="Choose a class" />
<FormGroup label="Amount" name="amount" type="number" error="Enter an amount greater than zero" />
```

### Notes

* `required` adds a red asterisk after the label, not the word "required".
* `error` swaps the border to red and prints the message below in 0.78rem red; `help` prints the same size in `--d-muted`. Show one or the other, not both.
* The control is uncontrolled (`defaultValue`) — mirroring the Blade original, which re-renders from `old()`.
* `select` gets the chevron background image; don't add your own arrow.
* There is no standalone `Input`, `Select`, `Checkbox` or `Switch` component. Raw `.ds-input` / `.dt-checkbox` classes exist for the cases FormGroup can't cover.


---

# 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://klassdocs.gitbook.io/klassapp-documentation/design/system/components/forms/formgroup.prompt.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.
