Welcome to the nuBuilder Forums!

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

[Solved] Save and Close Form

Questions related to using nuBuilder Forte.
Post Reply
MacWomble
Posts: 13
Joined: Wed Sep 01, 2021 3:23 pm

[Solved] Save and Close Form

Unread post by MacWomble »

Is there a way to close the edit form after saving automatically?
Last edited by MacWomble on Mon Sep 06, 2021 9:25 am, edited 1 time in total.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Save and Close Form

Unread post by kev1n »

Adding this JavaScript code to the form's Custom Code will take you to the previous breadcrumb after saving the form.

Code: Select all

function nuAfterSave() {
  nuOpenPreviousBreadcrumb();
}
MacWomble
Posts: 13
Joined: Wed Sep 01, 2021 3:23 pm

Re: Save and Close Form

Unread post by MacWomble »

Thanks a lot, I'll give it a try tomorrow.
Last edited by MacWomble on Thu Sep 02, 2021 7:41 am, edited 1 time in total.
MacWomble
Posts: 13
Joined: Wed Sep 01, 2021 3:23 pm

Re: Save and Close Form

Unread post by MacWomble »

This did not solve it. Nothing happens also after refreshing the form. :(
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Save and Close Form

Unread post by kev1n »

Check out the "Close after Save" Demo @ https://test.nubuilder.cloud/
You do not have the required permissions to view the files attached to this post.
MacWomble
Posts: 13
Joined: Wed Sep 01, 2021 3:23 pm

Re: Save and Close Form

Unread post by MacWomble »

Hi Kev1n,

It's not active in the demo, but it is exactly what I am looking for ;)
I copied the code from Demo to my form, but it still does nothing except
saving the data. There is also no entry in the debug list.

Is it possible that something is missing on my system? Any idea? :roll:
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Save and Close Form

Unread post by kev1n »

What version are you using (see version.txt)?
MacWomble
Posts: 13
Joined: Wed Sep 01, 2021 3:23 pm

Re: Save and Close Form

Unread post by MacWomble »

Hi, there is no version.txt. I installed with

git clone https://github.com/steven-copley/nubuilder4.git

on monday.

But that is a good point to start search for. I knew what I'll do on weekend ;-)
MacWomble
Posts: 13
Joined: Wed Sep 01, 2021 3:23 pm

Re: Save and Close Form

Unread post by MacWomble »

Ok, you're right. I used a wrong URL. :shock:

With
git clone https://github.com/nuBuilder/nuBuilder-4.5
it now works great. Thank You ! :D
Post Reply