I am new to js oop and i dont understand how i can do this.
i have
var Cadastro = Object.create(QForm);
var options = {
myInstanceName: "Cadastro",
dependentListsMode: "one",
defaultButtons: ['enter-query', 'new']
}
Cadastro.initForm(options);
then i have QForm.js
var QForm;
QForm = {
initForm: function (parms) {
$.extend(this, parms);
var frmObj = $(this.formId);
this.userRestrictions(parms);
$(this.currentForm).find("a[data-form-action]").hide();
this.clearForm();
this.disableFields();
},
The problem is that if i have e object in the same page , this.currentForm have the value of the latest intantiated object .
QForm.js is very extense file with lot of methods. How can i manage this. Thanks
this.currentForm?