Page 1 of 1

Clone - how to add some actions after pressing Clone button

Posted: Thu Aug 29, 2019 2:16 pm
by Janusz
Hi,
After pressing Clone button on the edit form I want to hide some objects on the form (specyfically to hide subfrom)
How I could do it? (where to place nuHide(..) )

Re: Clone - how to add some actions after pressing Clone but

Posted: Thu Aug 29, 2019 2:35 pm
by kev1n
Does this work?

Code: Select all

if (nuFormType() == 'edit') {

	if (nuIsClone()) {
		nuHide(..);
	}

}

Re: Clone - how to add some actions after pressing Clone but

Posted: Thu Aug 29, 2019 4:51 pm
by Janusz
Thanks for replay.
The code is not working. It looks like that after pressing Clone button the edit form is not refreshing so not reading the JS custome code - at least this is my assumption.
What Im trying now is to modify nuform.js by adding additional function inside the nuCloneAction().

Re: Clone - how to add some actions after pressing Clone but

Posted: Fri Aug 30, 2019 12:18 am
by admin
Janusz,

Try this...

https://wiki.nubuilder.cloud/ ... #nuOnClone

Code: Select all


function nuOnClone(){
   $('#zzzzsys_event_sf').hide();
}


Steven

Re: Clone - how to add some actions after pressing Clone but

Posted: Fri Aug 30, 2019 3:53 pm
by Janusz
Yes - it's working :-)
Thanks a lot.

Re: Clone - how to add some actions after pressing Clone but

Posted: Sat Aug 31, 2019 1:49 am
by admin
.