Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Clone - how to add some actions after pressing Clone button

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Clone - how to add some actions after pressing Clone button

Unread post 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(..) )
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

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

Unread post by kev1n »

Does this work?

Code: Select all

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

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

}
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

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

Unread post 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().
If you like nuBuilder, please leave a review on SourceForge
admin
Site Admin
Posts: 2822
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

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

Unread post by admin »

Janusz,

Try this...

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

Code: Select all


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


Steven
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

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

Unread post by Janusz »

Yes - it's working :-)
Thanks a lot.
If you like nuBuilder, please leave a review on SourceForge
admin
Site Admin
Posts: 2822
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

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

Unread post by admin »

.
Post Reply