I am trying to figure out the best way to create a form, and I think I need to add a layout to the tab window, therefore dividing the box in half. But I am having issues attaching the 2E layout to the area.
var myForm, formData, formData2;
var dhxTabbar;
function doOnLoad() {
formData = [
{type: "settings", position: "label-left", labelWidth: 145, inputWidth: 150},
{type: "block", inputWidth: "auto", list:[
{type: "settings", position: "label-left"},
{type: "file"},
{type: "input", label: "Name", value: "file_name"},
{type: "input", label: "Description", rows:5, style:"width=100px; height=100px"},
{type: "checkbox", position:"label-right", label:"Show in email?"},
{type: "checkbox", position:"label-right", label:"Show in web?"},
{type: "button", name:"attach", value: "Attach File"},
{type: "newcolumn"},
{type: "select", label:"Category:", options:[
{text:"Property Information Report", value:"propertyinfo"},
{text:"Home Inspection Report", value:"homeinspection"},
{text:"Other Report", value:"otherreport1"},
{text:"Other Report", value:"otherreport2"},
{text:"Other Report", value:"otherreport3"},
]},
{type:"input", label:"Note", rows:3, style:"width=100px; height:100px"}
]},
{type: "block", inputWidth: "auto", id: "tab2", list:[
{type: "input", offsetTop: 14, label: "Report Email Message", value: "",
rows:3, style:"width:300px"},
{type:"checkbox", position:"label-right", value:"defaultmsg", label:"Set as default message"},
{type:"label", label:"Email Details"}, //this is what needs to go in the bottom part of the layout
{type:"select", options:[
{text:"Client", value:"client"},
{text:"Selling Agent", value:"selling_agent"},
{text:"Listing Agent", value:"listing_agent"},
{text:"Escrow Agent", value:"escrow_agent"},
{text:"Email", value:"email"},
{text:"Fax", value:"fax"}
]},
{type:"newcolumn", offsetTop:400},
{type:"label", label: "Email List"},
{type:"input", vale: "Show email of selection/enter email"},
{type:"newcolumn", offsetTop:100},
{type:"select", options: [
{text: "Attachment", value: "Attachment"},
{text: "Link", value: "link"},
{text:"Both", value: "both"}]},
{type:"newcolumn", offsetTop:25},
{type: "button", name:"add", value: "Add"}
]}
];
dhxTabbar = new dhtmlXTabBar({
parent: "tabbarObj",
tabs: [
{id: "a1", text: "Attach Documents", width:400, active: true},
{id: "a2", text: "Upload Documents", width:400}
]
});
myForm = dhxTabbar.cells("a1").attachForm(formData);
dhxTabbar.tabs("a2").attachObject("tab2");
dhxComponent.cells("a2").attachLayout("2E");
}