Object #<dhtmlXForm> has no method 'addItem'

When creating a form using the documented attachForm() method like so:

var myForm = tab.attachForm(jsonFormData);

The addItem() method does not seem to work.

myForm.addItem(null, jsonItemData, 0);

Uncaught TypeError: Object # has no method ‘addItem’

Other methods like .clear() don’t seem to give a problem.

Am I using this wrong?

-edit-
addItem() API doc:
docs.dhtmlx.com/doku.php?id=dhtm … rm_additem

-edit-
I figured out there’s a function called _addItem() (starting with underscore).

But it gives us a new error:

Uncaught TypeError: Cannot read property ‘_index’ of undefined dhtmlx.js:473
_addItem

Method addItem needs an extention dhtmlxform_dyn.js
Have you include it in the library?

No, but I am not using the separate form element either.
I am using dhtmlx_std_full 3.6 for development, it includes everything, right?

Unfortunatelly, file dhtmlxform_dyn.js wasn’t included in a standard version of dhtmlx.js
We will fix it in the next build.
You can use separate files, add all the form files after compilled one or recompile the whole library manually

Thanks. Can’t just include dhtmlxform_dyn.js? The rest of the form functionality seems to work.

If everything works fine - you can just include an extention.
If some issues arise, will include all form js files.