# Form

A container for input controls or button, you can load a form from a store script.

As with windows, the form also supports 2 types of layouts

* **grid**
* **flex**

[See layout docs](https://anacleto.gitbook.io/anacleto/anacleto-frontend/ui-builder/..#layout).

## Properties

In addition to the [default properties](https://anacleto.gitbook.io/anacleto/anacleto-frontend/ui-builder/components/..#properties) of the components you have the following properties available.

### Loading

* `store` store path of the script used to load data

## Methods

In addition to the [default methods](https://anacleto.gitbook.io/anacleto/anacleto-frontend/ui-builder/components/..#methods) of the components you have the following methods available.

### getRecord()

Return the form record value

```javascript
const record = panelsContext.myPanelId.getRecord()
```

### load()

Load the form fields from the `store` script

```javascript
panelsContext.myPanelId.load(args);
```

A store must return a JS object, for example:

```javascript
const uid = req.query.uid;
const tenant = req.headers.tenant;

...your logic

const ret = {
    uid: user.uid,
    displayName: user.displayName,
    email: user.email,
    emailVerified: user.emailVerified,
    disabled:  user.user.disabled ,
    lastSignInTime: user.metadata.lastSignInTime,
    creationTime: user.metadata.creationTime,
    userRoles: userRoles,
    rolesAvailable: rolesAvailable
};

return ret;
```

## Events

In addition to the [default events](https://anacleto.gitbook.io/anacleto/anacleto-frontend/ui-builder/components/..#events) of the components you have the following events available.

### onChange


---

# 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://anacleto.gitbook.io/anacleto/anacleto-frontend/ui-builder/components/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.
