Form

Overview

FORM is a component that presents a page section containing controls(check boxes, radio buttons, etc.). Ui-related FORM inherits from view.


Related sample: 02_form/01_init.html

Initialization

The following is an example of initialization with the commonly used parameters (to see a full list of FORM's parameters, please refer to the corresponding chapter of the manual):

dhx.ui({ 
        view:"form", 
        id:"leftform", 
        elements:[{ ... }]
});

All the controls that can be used in FORM (and not only in FORM, but also in TOOLBAR or as individual components) you can find in 'Controls' chapter.

Working with form

API Reference

Useful tips

  • Specify id if you're going to refer to FORM later.
  • Controls are derived classes, i.e. they inherit all the features of the base class (any control → View).
  • Use 'rows', 'cols' parameters of Layout to set the desired position of elements.
  • For form configuration (definition form elements) you can use load (loads values from external datasource) or parse (added data from a datasource) methods.
  • To set values for all controls in form you can use setValues.

Related articles

A full list of articles.

To use ui functionality, touchui.css and touchui.js files must be included.