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

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

Get an object with the containers of a responsive form.

Get the controller of the form.

Get an array with the elements in the form.

Get the foundset of the form.

Properties Detailed

_super

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

Type RuntimeForm

Sample

_super.some_method();

containers

Get an object with the containers of a responsive form.

Type containers

Sample

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

controller

Get the controller of the form.

Type controller

Sample

controller.enabled = !controller.enabled;

elements

Get an array with the elements in the form.

Type elements

Sample

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

Sample

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

Last updated