How can I use template withing forms?
My sample doesn’t work:
…
{view: “form”, id: “myform”,
elements:[
{template: “#name#”},
]
}
…
$$(“myform”).setValues({name: “xyz”})
Can I define new UI component like next:
webix.protoUI({
name: "template2",
getValue: function () { return this.getValues(); },
setValue: function (value, raw) { this.setValues(value); },
}, webix.ui.template);
You’re right using protoUI, but please note that get/setValues()
work with the attributes of data
property: