[][]Hello!
I have a strange problem when building a form with dtmlx touch.
My intention is to leave space (width) in order to scroll the form which contains many subforms.
it works correctly when i have only one subform and 2 labels but it shows nothing when i add other form.
the code is as below:
var toolbar = {
view:“toolbar”,
css:“toolbar”,
elements:[
{ view:“button”, label:“Back”, type:“prev”, align:“left”,inputWidth:80,click:“history.back();”},
{ view:“imagebutton”, align:“right”,src:“resources/images/tabbar/logout.png”, click:“logout();”}
]};
var entries=
{
type:“clean”,
rows:[
{type:“clean”,
cols:[
{ view:“button”,inputWidth:80, type:“form”, name: “save”, id:‘save’, label: ‘Save’, align:“right”,click:“if($$(‘general’).validate())get_form();” },
{ view:“button”,inputWidth:80, type:“round”, name: “cancel”, id:‘cancel’, label: ‘Cancel’, align:“left”, click:“window.history.back();” }
]},
{view:“label”,
label:“General Information”,
css:“block1”
},
{
view:“form”,
id:“general”, css:‘form1’,
height:“460”,
elements:[
{ view:"datepicker",dateFormat: \'%Y-%m-%d\',sameLine:false, name: "date_start", label: \'Start Date & Time *\', id:\'date_start\',date:new Date(2012,03,4),labelWidth: \'160\'},
{ view:"text", align:"right", name: "time_start", id:\'time_start\', label:"Start Time *", labelWidth: 160, position: "label-left"},
{ view:"datepicker",dateFormat: \'%Y-%m-%d\',sameLine:false, name: "ss_date_end", label: \'End Date & Time *\', id:\'ss_date_end\',date:new Date(2012,03,4),labelWidth: \'160\'},
{ view:"text", align:"right", name: "time_end", id:\'time_end\', label:"End Time *", labelWidth: 160, position: "label-left"},
{ view:"text", name:"technician_name", id:\'technician_name\', label: \'Technician *\', position: "label-left",labelWidth: 150},
{ view:"text", name:"contact_on_field", id:\'contact_on_field\', sameLine:true, label: \'Contact on field *\', position: "label-left", labelWidth: 150},
{ view:"text", name:"distance", id:\'distance\', sameLine:true, label: \'Distance\', position: "label-left", labelWidth: 150}
],
rules:{
date_start:dhx.rules.isNotEmpty,
ss_date_end:dhx.rules.isNotEmpty,
technician_name:dhx.rules.isNotEmpty,
contact_on_field:dhx.rules.isNotEmpty,
time_start:dhx.rules.isNotEmpty,
time_end:dhx.rules.isNotEmpty
}
} ,
{view:"label",
label:"Description",
css:"block1"
},
{
view:"form",
id:"actions", css:\'form1\',
height:"380",
elements:[
{ view:"checkbox", align:"left", name: "param_settings", id:\'param_settings\', label:"Parameter Settings", position:"label-left",labelWidth: 160, value: 0},
{ view:"checkbox", align:"left", name: "gas_leakage", id:\'gas_leakage\', label:"Gas Leakage", position:"label-left",labelWidth: 160, value: 0},
{ view:"checkbox", align:"left", name: "operator_error", id:\'operator_error\', label:"Operator error", position:"label-left",labelWidth: 160, value: 0},
{ view:"checkbox", align:"left", name: "wiring", id:\'wiring\', label:"Wiring", position:"label-left",labelWidth: 160, value: 0},
]},
{type:"clean",
cols:[
{ view:"button",inputWidth:80, type:"form", name: "save", id:\'save\', label: \'Save\', align:"right",click:"if($$(\'general\').validate())get_form();" },
{ view:"button",inputWidth:80, type:"round", name: "cancel", id:\'cancel\', label: \'Cancel\', align:"left", click:"window.history.back();" }
]}
]}
dhx.ready(function(){
dhx.ui.fullScreen();
dhx.ui({
id:“detailView”,
view:“form”,
css: “overall”,
elements:[
toolbar,
{type:“clean”,
cols:[
{ width:25 },
entries,
{ width:25 }
]
}
]
});
I don’t know where is the problem.
Please help me.