# RuntimeForm

## Overview

The `Form` class offers a powerful interface for interacting with runtime forms in Servoy, providing access to core properties and behaviors essential for dynamic UI and data handling. It facilitates interaction with foundsets, elements, variables, and responsive containers, enabling developers to create and manage forms programmatically.

## Features and Capabilities

The class supports retrieving and modifying foundsets, accessing form elements, and leveraging responsive form containers for advanced styling and layout customization. It also provides properties for interacting with controllers, allowing developers to enable or disable form components dynamically.

## Properties Summarized

| Type                                                                        | Name                      | Summary                                                    |
| --------------------------------------------------------------------------- | ------------------------- | ---------------------------------------------------------- |
| [RuntimeForm](/reference/servoycore/dev-api/forms/runtimeform.md)           | [\_super](#_super)        | Provides access to the methods of the parent of this form. |
| [containers](/reference/servoycore/dev-api/forms/runtimeform/containers.md) | [containers](#containers) | Get an object with the containers of a responsive form.    |
| [controller](/reference/servoycore/dev-api/forms/runtimeform/controller.md) | [controller](#controller) | Get the controller of the form.                            |
| [elements](/reference/servoycore/dev-api/forms/runtimeform/elements.md)     | [elements](#elements)     | Get an array with the elements in the form.                |
| [JSFoundSet](/reference/servoycore/dev-api/database-manager/jsfoundset.md)  | [foundset](#foundset)     | Get the foundset of the form.                              |

## Properties Detailed

### \_super

Provides access to the methods of the parent of this form.

**Type**\
[RuntimeForm](/reference/servoycore/dev-api/forms/runtimeform.md)

**Sample**

```js
_super.some_method();
```

### containers

Get an object with the containers of a responsive form.

**Type**\
[containers](/reference/servoycore/dev-api/forms/runtimeform/containers.md)

**Sample**

```js
containers.mycontainer.addStyleClasses("red","blue");
```

### controller

Get the controller of the form.

**Type**\
[controller](/reference/servoycore/dev-api/forms/runtimeform/controller.md)

**Sample**

```js
controller.enabled = !controller.enabled;
```

### elements

Get an array with the elements in the form.

**Type**\
[elements](/reference/servoycore/dev-api/forms/runtimeform/elements.md)

**Sample**

```js
var elems = elements;
application.output("This form has " + elems.length + " named elements.")
for (var i=0; i<elems.length; i++)
	application.output(elems[i].getName());
```

### foundset

Get the foundset of the form.

**Type**\
[JSFoundSet](/reference/servoycore/dev-api/database-manager/jsfoundset.md)

**Sample**

```js
application.output("selected index in form foundset: " + foundset.getSelectedIndex());
```

***


---

# 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.servoy.com/reference/servoycore/dev-api/forms/runtimeform.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.
