Форма
Форма - это специальная панель для отображения полей.
Она имеет свойство data, возвращающее массив со значениями полей.
// Создаем форму
var f = inx({type:"inx.form",items:[..]});
// Получаем данные
var data = form.info("data");
// @include inx.form,inx.layout.column
inx.ns("inx.mod.inxdev.example").form2 = inx.form.extend({
constructor:function(p) {
p.items = [
{
type:"inx.panel",
autoHeight:true,
border:0,
padding:0,
layout:"inx.layout.column",
items:[
{type:"inx.form",autoHeight:true,border:0,items:[
{type:"inx.textfield",labelAlign:"top",label:666,width:"auto"},
{type:"inx.textfield",labelAlign:"top",label:666,width:"auto"}]},
{type:"inx.form",autoHeight:true,border:0,items:[
{type:"inx.textfield",labelAlign:"top",label:666,width:"auto"},
{type:"inx.textfield",labelAlign:"top",label:666,width:"auto"}]},
{type:"inx.form",autoHeight:true,border:0,items:[
{type:"inx.textfield",labelAlign:"top",label:666,width:"auto"},
{type:"inx.textfield",labelAlign:"top",label:666,width:"auto"}]}
]
},
{label:666}
];
p.tbar = [
{text:"get data",onclick:[this.id(),"showData"]}
];
p.side = [{width:100,resizable:1,region:"right"}]
p.autoHeight = true;
this.base(p);
},
cmd_showData:function() {
inx.msg(this.info("data"));
}
});<script>
inx.conf.url='/inx/version/1199998280/';
inx({"type":"inx.mod.inxdev.example.form2"}).here()
</script>
// @include inx.form,inx.checkbox
inx.ns("inx.mod.inxdev.example").form = inx.form.extend({
constructor:function(p) {
p.items = [
{label:"Цвет",name:"color",type:"inx.color",value:"#ff0000"},
{label:"Строка",name:"string"},
{label:"Чекбокс",name:"checkbox",type:"inx.checkbox"},
{label:"Еще чекбокс",name:"checkbox2",type:"inx.checkbox"},
{label:"Текстовое поле",type:"inx.textarea",name:"textarea"},
{label:"Селект",type:"inx.select",loader:{cmd:"inxdev:example:listLoader"},name:"select"},
{label:"Дата",type:"inx.date",name:"date"},
{label:"Код PHP",type:"inx.code",value:"<? echo 123; ?>",lang:"php",name:"code"}
];
p.tbar = [
{text:"get data",onclick:[this.id(),"showData"]}
];
p.autoHeight = true;
this.base(p);
},
cmd_showData:function() {
inx.msg(this.info("data"));
}
});<script>
inx({"type":"inx.mod.inxdev.example.form"}).here()
</script>