Adds a new item.
Required file: ext/dhtmlxform_dyn.js
Parameters:
pId - the parent item id, i.e. the id of the existing item you want to nest the new item into (the item's parameter 'name).
itemData - the object of the new item.
pos - the position that the new item will be added to.
insertAfter - (true/false, default false) if any “newcolumn” used - item will inserted into colunm where item[pos] positioned, before it; insertAfter specifies that new item will inserted after item[pos], to add possibility to make new item last in column; this param is ignored when inserting newcolumn.
//to add as an individual item
myForm.addItem(null, itemData, pos);
//to nest into some existing item
myForm.addItem(pId, itemData, pos);
Details: