How to build a complex form?
As form inherits from layout, you are allowed to place various elements into it for building a complex form.
To avoid potential errors you should know the following:
view:"form",height:260, id:"myform", elements:[ { type: "clean", cols:[ { view:"richselect", label: 'from', value: 1, id:'from', popup:"cities", width:280}, { view:"richselect", label: 'to', id:'to', value: 3, popup:"cities", inputWidth:270} ]}, { view:"toggle", id:'way', options: ["Roundtrip","Oneway"], width: 240, align: "left" }, { type: "clean", cols:[ { view:"checkbox", label:"find hotels", width:165, labelWidth: 100, labelAlign: "left", position: "label-right" }, { view:"checkbox", sameLine: true, label:"find car here", labelWidth: 102, width:200}, { view:"button", type:"form", label: 'Find flight', align:"center", inputWidth: 140, className: "form_search_btn" } ]} ]
$$('form_id').elements["name_in_form_collection"]=$$("id_of_element")// 'name_in_form_collection' is any name under which the element will be stored in form's collection //for example: $$("myform").elements.["list_element"] = $$('mylist');
Related sample: ui/view/07_full_sample.html