dynamic form and post management

Hello , I have a dynamic form “triggerConditionForm” which use “triggerSensor” or “triggerPattern” but not at the same time (I use hide and show in fonction of context) : http://webix.com/snippet/0d438824
If I have the same name “source”, how it possible to send to server the right element (the element which is shown when I click to a button) when I use form.getValues() in post request. I tried to hide and to disable but the element is always active. Actually, I have always the last source declared.

Second question , I have 2 forms in tab view . and I use hide and show to see the right form in fonction of context. I have have a button at the end of page to submit form. The problem is when I show the right form (and hide the other) , the form is on 50% of page instead of 100%, I tried several things (adjust …) but the form don’t take all the height of container. What 's the good properties to do that ?

Thanks :slight_smile:

(1)

Form can’t have multiple elements with same name. It is by design, and can’t be worarounded. The best solution - you can have fields with different names, and before sending data, you can normalize them

var values = form.getValues();
values.source = values.source1 || values.source2;

Also, as an alternative solution, you can use nested sub-forms ( unlike HTML forms, Webix allows to place one form inside of other one ). Each form can have its own set of names. ( so you can have two source fields in the same time )

(2)

Not quite sure, but try to add the spacer to end of the form

var form = { view:"form", elements:[ input, input2, input3, {} ] };