Form Load not working

Hi there,

I’m trying to load data into a form which is attached to a window but not working. Below is the code to initialize my window and form :

    dhxWins = new dhtmlXWindows();
        dhxWins.setImagePath("../../codebase/imgs/");
        
        w1 = dhxWins.createWindow("w1", 0, 0, 400, 400);   

        w1.clearIcon();
        w1.setText("Task Details");
        w1.denyResize();
        w1.setModal(true);
        w1.centerOnScreen();
        w1.button("park").hide();
        w1.button("minmax1").hide();
        
        var dhxForm = w1.attachForm(a1Data);
        dhxForm.load({
          Task:1 
        }); 

here is the code for the select box
type: “select”, name: “taskType”, label: “”, bind:“Task”, options:

I’m hoping the code suppose to select the first item in the select box which is not - any help with be highly appreciated …

Thanks

load method takes url as a parameter:

dhtmlxForm/samples/05_data/01_load.html

Or you may use setItemValue method:

dhxForm.setItemValue(“Task”,1);