When adding on grid page: w1.attachForm is not a function.

I’m trying to integrate a dhtmlx-window with a form inside, on top of a page with a dhtmlx-grid.

I first tried to put the window-form sample on the same page as my grid page but it gives me the error: w1.attachForm is not a function.
I do however have all the JS files in the and when checking the console they get loaded properly. Both the form, window and grid js files.
Does anyone know what I am missing?

Here’s my head:

<script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxGrid_v45_std/codebase/dhtmlxgrid.js"></script> <script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxChart_v45_std/codebase/dhtmlxchart.js"></script> <script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxForm_v45_std/codebase/dhtmlxform.js"></script> <script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxCalendar_v45_std/codebase/dhtmlxcalendar.js"></script> <script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/dhtmlxWindows_v45_std/codebase/dhtmlxwindows.js"></script> <script src="<?php bloginfo('template_url'); ?>/frameworks/dhtmlx/plugins/custom_columns.js"></script>

Answer:

When adding a form in a window you need to make sure you add the dhtmlxform.js AFTER the dhtmlxwindows.js in the head! Then it will work.