# 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](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform)           | [\_super](#_super)        | Provides access to the methods of the parent of this form. |
| [containers](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform/containers) | [containers](#containers) | Get an object with the containers of a responsive form.    |
| [controller](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform/controller) | [controller](#controller) | Get the controller of the form.                            |
| [elements](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform/elements)     | [elements](#elements)     | Get an array with the elements in the form.                |
| [JSFoundSet](https://docs.servoy.com/reference/servoycore/dev-api/database-manager/jsfoundset)  | [foundset](#foundset)     | Get the foundset of the form.                              |

## Properties Detailed

### \_super

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

**Type**\
[RuntimeForm](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform)

**Sample**

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

### containers

Get an object with the containers of a responsive form.

**Type**\
[containers](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform/containers)

**Sample**

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

### controller

Get the controller of the form.

**Type**\
[controller](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform/controller)

**Sample**

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

### elements

Get an array with the elements in the form.

**Type**\
[elements](https://docs.servoy.com/reference/servoycore/dev-api/forms/runtimeform/elements)

**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](https://docs.servoy.com/reference/servoycore/dev-api/database-manager/jsfoundset)

**Sample**

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

***
