Data binding form with multiple values in array

I have a datatable with a key-values collection that looks like this.

    {key: "gender", values: [
        {value:"1", label:"Male"},
         {value:"2", label:"Female"}
    {key: "payment_types", values: [
        {value:"1", label:"Cash"},
        {value:"2", label:"Credit Card"},
        {value:"3", label:"Debit Card"}, 
        {value:"4", label:"Invoice"}

Each key can have multiple values. I am able to display this in the grid using the format function for the values.

Now, I want to be able to bind this to a form as shown in the example How do I go about this? Are there some advanced options in the "bind" method?

(I am new to Webix and Webix is awesome by the way).


  • edited March 2017

    Binding rules/features are described here. But can you please provide a sample of how exactly do you transform your data to render it?

    Due to binding, it is possible to change the data in grid using widgets in form. name property of each control has to match the data attribute that you need to change.

    If you want to create a form with some kind of select (select, richselect, multiselect, etc.), it should contain the array of options anyway.

    As a solution, you can provide the same set of options for column's collection in datatable and for the form's control:

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion