//namespace var formGenerator={}; formGenerator.print= function(msg){ console.log(msg); } formGenerator.init= function(cb=null){ let that=this; let action=function(){that.afterScripts(cb);}; let dependencies=new Array(); dependencies.push("crfDORA/crfHTML.js"); dependencies.push("crfDORA/crfSetup.js"); dependencies.push("crfDORA/crfData.js"); dependencies.push("crfDORA/runQuery.js"); LABKEY.requiresScript(dependencies,action); } formGenerator.afterScripts= function(cb=null){ crfData.setSetup(crfSetup); let initData=function(){crfData.init(cb);}; crfSetup.init(initData); } formGenerator.setRoleAndSite= function(roleAndSite){ this.roleAndSite=roleAndSite; } formGenerator.showFormGenerator= function(){ if ("table" in this){ this.table.display='block'; return; } this.addFormGenerator(); } formGenerator.hideFormGenerator= function(){ if (this.table){ this.table.display='none'; } } formGenerator.getCrfSelectRow= function(crfRef){ let rows=this.crfSelectRows; for (let i=0;i