DHTMLX Touch documentation

Form

Form is a component that presents a page section containing special elements called controls (checkboxes, radio buttons, etc.). Ui-related form inherits from view.


Full code of the example in the picture

Initialization

To init the component you need to perform a simple procedure - call initialization code.

Initialization code or an object constructor, lets you create object by using common declaration.

dhx.ui ({view:"form", 
...})

All the available form controls and their attributes

Parameters

In constructor you can specify the following parameters:

  • scroll - (boolean) defines whether a possibility to scroll will be enabled. The default value is 'false'.

Please note, form is a derived class, i.e. it inherits all the features of the base classes (form → view).

dhx.ui({ 
        rows:[{
             view:"form", id:"leftbar", data:[
                                    { type:"button", name: "field_a", value: 'Save', align:"right", label:"Save" },
                                    { type:"calendar", name: "field_b", label: 'Date' }]
	     }]
        ...
});

Brief information concerning 'id' (this parameter form inherits from the base class 'view').
You can set 'id' both for the whole form and for any of the controls.

Related how-tos