Welcome to the nuBuilder Forums!

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

Go back to browse after edit

Questions related to using nuBuilder Forte.
Locked
marcvander
Posts: 101
Joined: Mon Mar 26, 2018 5:57 pm

Go back to browse after edit

Unread post by marcvander »

Hey,

when I'm browsing a form, and then entering editing after clicking on one of the entries, I cannot go back to the browse page. The navigation tree doesn't allow me to click on the current form name to come back to browse. Example:

1- I browse the form called "Contact"
Capture d’écran 2018-06-15 à 12.55.15.png
2- In edit form, there is no way to go back to browse "Contact" form in the tree, because it acts like i'm already on "Contact" form
Capture d’écran 2018-06-15 à 12.55.28.png
3- when clicking on "Admin Home", it brings me back to the menu, not the browse page
Capture d’écran 2018-06-15 à 12.55.41.png
How can I access the browse back ?
You do not have the required permissions to view the files attached to this post.
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Go back to browse after edit

Unread post by toms »

Is a custom nuSelectBrowse() used to open the edit form?

If yes, open the edit form with just these two parameters (form id, record, id).eg.

Code: Select all

nuForm('5b0bc3a7083dfac', '123221232123212');
marcvander
Posts: 101
Joined: Mon Mar 26, 2018 5:57 pm

Re: Go back to browse after edit

Unread post by marcvander »

Yes indeed there is a nuSelectBrowse()

Code: Select all

function nuSelectBrowse(e) {

    var r   = $('#' + e.target.id).attr('data-nu-primary-key');
    nuSetProperty('MAIN_FORM_RECORD_ID', r);
    nuForm(nuGetProperty('form_id'), r, '', '', '1');
    
}
So shall I change something to this line ?

Code: Select all

nuForm(nuGetProperty('form_id'), r, '', '', '1');
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Go back to browse after edit

Unread post by toms »

Like this:

Code: Select all

function nuSelectBrowse(e) {

    var r   = $('#' + e.target.id).attr('data-nu-primary-key');
    nuSetProperty('MAIN_FORM_RECORD_ID', r);
    nuForm(nuGetProperty('form_id'), r);
    
}
marcvander
Posts: 101
Joined: Mon Mar 26, 2018 5:57 pm

Re: Go back to browse after edit

Unread post by marcvander »

Perfect thanks, solved !
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Go back to browse after edit

Unread post by admin »

.
Locked