myform.addItem

Is there such functionality where but one can add a field dynamically to a form?

Hi

unfortunately not now. maybe i future versions.

Hi There

There is now the function for adding and removing items but i have a problem with them…

I created a form and but a Event OnChange to the Form. When the Field Creator changed i wanna load the version new:

db_form.attachEvent(“onChange”, function (id, value){
if (id == ‘Creator’){
db_form.removeItem(‘VERSION’);
var itemData = {type: “select”, name: ‘VERSION’, label: “Version”,connector: “./php/selectbox.php?param=db_version&dbtype=” + value, } ;
db_form.addItem(‘CREATOR’, itemData, 0);
}
});

This is all working fine but the new field is not on the same level then the other input fields… how can i change the position of these field. I tried with offsetLeft but this isn’t working…

Hi
Please provide us demo to help
docs.dhtmlx.com/doku.php?id=othe … leted_demo
But seems like you need
db_form.addItem(parent item of ‘CREATOR’, itemData, 0);