Hi Webix Team,
I would like to create edit form dynamic way. So made the function updateFormElements to generate form elements from var.
When you click at the row once it works fine. Then If you hide editor and click again editor shows nothing.
Is there any way to create edit form before show editor?
Please, see the snippet https://snippet.webix.com/it602cfn
Modified code:
onItemDblClick:function(){
updateFormElements();
$$("editwin").show();
}
}
function updateFormElements(){
var formElementsConfig = [
{ view:"text", label:"Title", name:"title"},
{ view:"text", label:"Year", name:"year"},
{ view:"text", label:"Votes", name:"votes"},
{ cols:[
{ view:"button", value:"Cancel", click:function(){
this.getTopParentView().hide();
}},
{ view:"button", type:"form", value:"Save", click:function(){
this.getFormView().save();
this.getTopParentView().hide();
}}
]}
];
webix.ui(formElementsConfig, $$('editform'));
}