form.showBatch / visibleBatch

Hi,
I need to use batches feature in form,
can you please answer what is wrong here: http://webix.com/snippet/4d72cd6d
Why showBatch does nothing? Why visibleBatch is ignored?

Also, can I hide both batches? Similar like showBatch(“none”) - non existent batch?

There are several mistakes:

  1. unnecessary rows:[]. For the ui.form elements:[] and rows:[] means the same. This is the actual reason why batches are not showing properly;
  2. if you set onChange within the elementsConfig, this event will work for every control. As far as I can see, you need to attach onChange to the particular select control;
  3. the initial values of the select control and visibleBatch should correspond to each other.

And yes, you can create an empty view in another batch.

Here’s the snippet:

http://webix.com/snippet/16677c37

Thank you!
Actually I need two columns of form elements like this: http://webix.com/snippet/99002cc0

And it doesn’t work :frowning:

Basically, the feature works if the form doesn’t contain sub-rows/-columns. You need to call each column before you set the batch:

http://webix.com/snippet/79773420

Thank you!