Dear Webix Team,
i have a problem when injecting webix ui component into htmlform view.
i have a code like this.
const formTemplate2 =
"<div id=\"template_form-template\"></div><div class=\"dvPrvw\">" +
"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"tbPrvw\" >" +
"<tr>" +
"<td width=\"15%\" class=\"clbl\"><label for=\"country_code\">Country Code</label></td>" +
"<td class=\"cinp\" ><div id=\"country_code\"></div></td>" +
"</tr>" +
"<tr>" +
"<td class=\"clbl\"><label for=\"description\">Description</label></td>" +
"<td colspan=\"3\" class=\"cinp\"><div id=\"description\"></div></td>" +
"</tr>" +
"</table>" +
"</div>";
var form = {
id: "template_form", css: "content-form", active: false,
view: "htmlform", template: formTemplate2, //content.template,
on: {
'onAfterRender': function() {
webix.ui({ id: "country_code", name: "country_code", container: "country_code", view: "text", type: "text", width: 150, required: true });
webix.ui({ id: "description", name: "description", container: "description", view: "textarea", height: 100, width: 150, required: true, readonly: true /*, value: "haha huhu"*/ });
}
}
};
when i inspect webix html form element in browser inspection for example $$("template_form").elements;
I just have one elements inside template_form that is webix ui description (textarea). Country code UI didnt insert into template_form element but if i change the view type of country code into textarea, that view inserted/appear in template_form elements.
Is this some of webix problem or i use wrong method ?
I hope webix team can give me explanation about this.