Hi it’s me again,
I would like to return to the browse after saving in a popup…
Form A: browse/edit
Form B: Edit only
Here is the sequence I would like,
Open form A in “Browse”
Choose a row, open form A in “Edit”
On form A click a button that opens Form B in POPUP “Edit”
On save Form B, Close POPUP (Form B) return to Form A in “Browse”
Thank you in advance for your help !!!
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Return to the browse after saving in a popup
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Return to the browse after saving in a popup
Hi,
Code in the popup / form B (untested):
Code in the popup / form B (untested):
Code: Select all
function nuAfterSave() {
if (parent.$('#nuModal').length > 0) {
let l = parent.window.nuFORM.breadcrumbs.length;
if (l > 1) {
parent.nuGetBreadcrumb(l - 2);
}
}
}
-
- Posts: 5
- Joined: Mon Jul 05, 2021 8:38 am
Re: Return to the browse after saving in a popup
hi any suggestion how to close pop-up B after saving?
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Return to the browse after saving in a popup
Try it like this:
Code: Select all
function nuAfterSave() {
if (parent.$('#nuModal').length > 0) {
nuClosePopup();
}
}
-
- Posts: 5
- Joined: Mon Jul 05, 2021 8:38 am
Re: Return to the browse after saving in a popup
kev1n wrote: ↑Wed Jul 13, 2022 1:09 pm Try it like this:
Code: Select all
function nuAfterSave() { if (parent.$('#nuModal').length > 0) { nuClosePopup(); } }
hi, who try this code? is it working?
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Return to the browse after saving in a popup
Can you describe your use case in more detail? How do you open the popup, where did you add the code, what do you expect to happen when the form closes?