Hi,
How do I detect a clone action? What I'd like to do is to change the Access of an object from Readonly to Editable after the record has been cloned.
E.g. a field "employee number" is normally readonly and not changeable unless the record is cloned.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Clone Event - change field access
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: Clone Event - change field access
Thanks, now I can change the visibility with this piece of code:
Now I just need to figure out how to trigger it. As soon as the "Clone'-button is clicked, the code should be executed.
Edit: I attached another click handler to the clone button:
On second thought I wouldn't need the nuIsClone() with this solution. Or is there a better way to do it?
Code: Select all
if (nuIsClone()) {nuEnable('myfield');} else {nuDisable('myfield');};
Edit: I attached another click handler to the clone button:
Code: Select all
$("#nuCloneButton").click(function() {
if (nuIsClone()) {nuEnable('myfield');} else {nuDisable('myfield');};
});
Re: Clone Event - change field access
toms,
That is now done in Github.
http://wiki.nubuilder.net/nubuilderfort ... #nuOnClone
nuIsClone() will still be useful.
Steven
That is now done in Github.
http://wiki.nubuilder.net/nubuilderfort ... #nuOnClone
nuIsClone() will still be useful.
Steven
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am