[Solved] Save and Close Form

Questions related to using nuBuilder Forte.

[Solved] Save and Close Form

Unread postby MacWomble » Wed Sep 01, 2021 11:01 pm

Is there a way to close the edit form after saving automatically?
Last edited by MacWomble on Mon Sep 06, 2021 4:55 pm, edited 1 time in total.
MacWomble
 
Posts: 13
Joined: Wed Sep 01, 2021 10:53 pm
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby kev1n » Wed Sep 01, 2021 11:57 pm

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();
}
kev1n
nuBuilder Team
 
Posts: 2008
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby MacWomble » Thu Sep 02, 2021 2:27 am

Thanks a lot, I'll give it a try tomorrow.
Last edited by MacWomble on Thu Sep 02, 2021 3:11 pm, edited 1 time in total.
MacWomble
 
Posts: 13
Joined: Wed Sep 01, 2021 10:53 pm
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby MacWomble » Thu Sep 02, 2021 3:08 pm

This did not solve it. Nothing happens also after refreshing the form. :(
MacWomble
 
Posts: 13
Joined: Wed Sep 01, 2021 10:53 pm
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby kev1n » Thu Sep 02, 2021 3:30 pm

Check out the "Close after Save" Demo @ https://test.nubuilder.cloud/
Attachments
save_close.gif
save_close.gif (664.03 KiB) Viewed 162 times
kev1n
nuBuilder Team
 
Posts: 2008
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby MacWomble » Thu Sep 02, 2021 5:12 pm

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:
MacWomble
 
Posts: 13
Joined: Wed Sep 01, 2021 10:53 pm
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby kev1n » Thu Sep 02, 2021 6:17 pm

What version are you using (see version.txt)?
kev1n
nuBuilder Team
 
Posts: 2008
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby MacWomble » Fri Sep 03, 2021 7:28 pm

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 10:53 pm
nuBuilder Version: 4.5

Re: Save and Close Form

Unread postby MacWomble » Mon Sep 06, 2021 4:55 pm

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
MacWomble
 
Posts: 13
Joined: Wed Sep 01, 2021 10:53 pm
nuBuilder Version: 4.5


Return to General

Who is online

Users browsing this forum: No registered users and 13 guests

cron