Attach dhtmlxform to a layout's cell

Dear all,

I have an html form that i would like to present inside a dhtmlx container. I have tried creating a dhtmlxform as an already existing form as below:

var dhxForm = new dhtmlXForm(“my_form”);

my_form being:

.......

How do i attach this dhxForm object to a layout’s cell?

Hi,

you may try to use attachObject method:

layout.cells(id).attachObject(“my_form”);

Also there is attachForm method. The example is dhtmlxForm/samples/01_init/05_window.html

Hi Alexandra,

Thanks for the help.

Please note that attaching the form as below:

layout.cells(id).attachObject(“my_form”);

doesn’t seem to work for me as it gives an error about the arguments(most likely my_form). dhtmlxContainer on line 14 highlights this that.dhxcont.mainCont.appendChild(obj)

and i am not able to run example htmlxForm/samples/01_init/05_window.html, because it does not open properly.

Hi,

do you use the 2.6 version for all components ? It seems that you use the all dhtmlxcontainer.js

Hi,

I get it. I am using the dhtmlxcontainer.js from dhtmlxLayout v.2.5. Let me get v.2.6 and try it again.

Thanks.