# Using fieldsets

## Configuring fieldsets

Configuring Fieldsets is done within the Site Builder under the Forms section.

### Adding Fieldsets to a Form

When editing a Form, you can add and order Fieldsets. When adding a fieldset, you will be setting a "Slug" value. This value is used to group and assign fields and should be entered as just letters, numbers and dashes (i.e. `custom-fieldset`).

![](/files/-MQmWHGNleNpG-Br94t4)

You also have the option to enable a Legend for the Fieldset (optional). If set, this will add a `<legend>` attribute to the top inside the `<fieldset>` element. This legend can be used to label that group of fields for the visitor.

### Assigning Fields to a Fieldset

Each field can be assigned using the `slug` value of the Fieldset. This value is entered into the "In Fieldset" field under the "Advanced" section when editing a particular Field.

![](/files/-MQmWKtMyoAEMbXINBwn)

## Default Fieldset

If a field is not assigned to a Fieldset, it will be added to a default `<fieldset>` at the first position within the form. For example, if you just add a form with 3 fields with no custom Fieldset, then the form will contain the single `<fieldset>` element with all of your 3 fields within it.

If all fields within the form are assigned to custom Fieldsets, then the first default `<fieldset>` will not be output into the HTML.


---

# 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.devhub.com/forms/using-fieldsets.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.
