multitext from array of objects and back to array

I have the following data structure which could have up to 10 entries:

"telephone": [
  {
    "telephone": "1234345643334",
    "type": "work"
  }
  {
    "telephone": "432523452435",
    "type": "home"
  }
]

and like to make it editable by the user in a form. I like to use the multitext control or any other control which dynamically builds its input fields from the array. I’m thinking of something similar to ios/osx phonce book app. the type attribute should be editable as well.
thanks for your help

Hello,

MultiText control allows to edit only one property (available in pro edition only):

http://docs.webix.com/samples/60_pro/02_form/01_multitext.html

And you can use DataTable to show and edit dataset with multiple properties:

http://docs.webix.com/samples/15_datatable/04_editing/03_multiple_editors.html

But the telephone attribute is part of an contact object. so how can i show this in datatable or an other webix component which is editable?

{
name: “foo”,
birthDate: “1988-11-11”,
“telephone”: [
{
“telephone”: “1234345643334”,
“type”: “work”
}
{
“telephone”: “432523452435”,
“type”: “home”
}
]
}

please elaborate a bit. thank you.

You can use scheme $init to define “telephone_work” and “telephone_home” values:

http://webix.com/snippet/7ed213fa

Thank you Maria.
But my telephone property is an array, because there could be up to 5 phone numbers. I need a component which loops over the members and shows a dynamic form, depending on the members, e.g.:
work: 2452345324
home: 242134234
home: 4223423432
mobile: 33333421

similar like apple does it:

so it is basically an array of object where on can change the type & the number.
any idea?

Hello,

Please take a look at the article about changing form structure:

http://docs.webix.com/desktop__dynamic_layout.html#rebuildingapplicationlayout

Probably you need to load data via webix.ajax() and then set elements you need.