Tree inside form

Hi,

  1. Is it possible to have a webix tree control as one of the webix form fields. i.e. tree inside form?
    If yes what should be the value of “view” property.
    Kindly provide a sample if possible.

pseudo code below:
webix.ui({
container: “myform”,
view: “form”,
scroll: false,
width: 300,

            elements: [
				{ view: "text", label: "Name" },
                { view: "tree", label: "Some tree" }, //tree should be displayed for this field
            ]

});
2) Also, is it possible to place a custom html for a webix form field
Kindly provide a sample if possible.

pseudo code below:
webix.ui({
container: “myform”,
view: “form”,
scroll: false,
width: 300,

            elements: [
				{ view: "text", label: "Name" },
                { view: "html", label: "Some custom html", template: "<div><span>Custom html template</span></div>" }, //custom html should be displayed here
            ]
        });

Thanks in Advance.
~Gaurav

Hi,

Form is Layout-based view. So, you can place any other view as a row (elements are renders the same as layout rows).

Tree and Template are not form controls. And these views do not have setValue()/getValue() methods and “label” property:

http://webix.com/snippet/f933c975

Docs for Form controls:
http://docs.webix.com/desktop__controls.html

Also there is not a view “html”. You can use use “template” or “label” view instead.

Thanks a lot Maria

How I can reference that tree in the form? since elements.tree doesn’t exist. Thanks!

Disregard this. I found the way to accomplish this. Thanks.