DHTMLX Docs & Samples Explorer

Object Constructor

Constructor is used to create an object, to set its initial parameters.

  • parentObj - an id or an object that will be used as parent container;
  • listData - items in case of object initialization (optional)

The possible variants of the constructor are shown below:

var dhxForm = new dhtmlXForm("parentId");
var listData = [
        {type:"radio", name:"color", value:"r", checked:true, label:"Red"},
        {type:"radio", name:"color", value:"g", label:"Green"},
        {type:"radio", name:"color", value:"b", label:"Blue"}
         ];
var dhxForm = new dhtmlXForm("parentId", listData);