form.getValues only from visible input

Hi,
how can I get values only from visible input view?

example

{ view: "text", name: "ilvalore1", hidden:true, batch:"batch_1", label: "Panbagnatoabel", value: "Value", labelAlign: "left", type: "text", id: "input_0"}, { view: "text", name: "input2", hidden:true, batch:"batch_2", label: "Label", value: "Value", labelAlign: "left", type: "text", id: "input_1"}, { view: "counter", name: "input3", hidden:true, batch:"batch_3", label: "Label", step: 1, value: 0, labelPosition: "right", labelAlign: "left", id: "input_2"}

I use showBatch function, then I use $$(‘ui_form’).getValues();

(sorry for my english…i hope you understand)

Hi,

getValues() returns values of all Form items. And there is not a ready method in Touch API that will return only values of visible items. You may try to check items visibility using siVisible method:

var data = {}; var elements= $$('ui_form').elements; for(var name in elements){ if(elements[name].isVisible()) data[name] = $$('ui_form').getItemValue(name); }