lcollong
FabriKant d'applications web
Hi,
We'd like to allow the Form's copy button available only to some group of users (Access level dependent). There is nothing available in the form's setup AFAIK.
I've created a Button Element to overcome these situation as it is possible to make the element ACL dependent. But I had difficulties to find the right js to fire a copy event.
Reading the sources, I've found a "poor solution" : rename the button before fire it ! Here is my code in the js tab under the "click" event :
It works. But is there any better/reliable solution ?
We'd like to allow the Form's copy button available only to some group of users (Access level dependent). There is nothing available in the form's setup AFAIK.
I've created a Button Element to overcome these situation as it is possible to make the element ACL dependent. But I had difficulties to find the right js to fire a copy event.
Reading the sources, I've found a "poor solution" : rename the button before fire it ! Here is my code in the js tab under the "click" event :
JavaScript:
var form = Fabrik.getBlock('form_2');
this.name="Copy";
form.mockSubmit('Copy');
It works. But is there any better/reliable solution ?