Welcome to the nuBuilder Forums!

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

Save & Close

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
vario
Posts: 151
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Save & Close

Unread post by vario »

In nuBuilderPro I could do a "save & close" using nuSaveForm with operation=2.

My workaround is to call nuSaveAction() followed by nuGetBreadcrumb() but nuGetBreadcrumb executes before the save has returned, so I have the following workaround:

Code: Select all

nuSaveAction();
setTimeout(() => { nuGetBreadcrumb(2); }, 500);
Is this a reasonable method or does anyone have a better suggestion?
kev1n
nuBuilder Team
Posts: 4302
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Save & Close

Unread post by kev1n »

vario
Posts: 151
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Save & Close

Unread post by vario »

I have a form to apply pre-defined adjustments to (potentially) alot of data and trying to keep the number of user clicks to a minimum.
I have the "save & close" in the click event of buttons (one for each adjustment type) on the edit form, so not quite what I'm looking for as this still makes two clicks per adjustment!
kev1n
nuBuilder Team
Posts: 4302
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Save & Close

Unread post by kev1n »

To be honest, I don't quite understand what you are trying to do. Apparently, it's not just a save + close
vario
Posts: 151
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Save & Close

Unread post by vario »

It is save&close, just done from the onclick event of a button, after modifying the data:

Code: Select all

$('#ftx_pos_regno').val($('#ftx_card_vrn_driver').val()).change();
$('#ftx_exception').val('0').change();
nuSaveAction();
setTimeout(() => { nuOpenPreviousBreadcrumb(); }, 500);
Post Reply