Edit existing record /permalink

Questions related to using nuBuilder Forte.

Edit existing record /permalink

Postby toms » Tue Dec 19, 2017 11:35 am

My workflow looks like this:

1. A user creates a new request (record) in a form by filling in and saving the entry.
2. A PHP script sends an email to the requester, acknowledging that the request was received.
3. At the same time, an email is sent to the support team, notifying them of a new request that requires action.

Now I'd like to add a link to the email that re-opens that specific record. This allows the support team to edit the record without the need to search for it manually.

I have found a solution in this thread:
viewtopic.php?f=15&t=8796&p=14966&hilit=nuLoadEditGlobal+#p14966

Any chance to implement it in V4? This would ease things a lot.
toms
toms
 
Posts: 438
Joined: Wed Nov 08, 2017 8:57 pm

Re: Edit existing record /permalink

Postby admin » Mon Jan 08, 2018 5:43 am

toms,

Leave it with me.

I have an idea...

Steven
admin
Site Admin
 
Posts: 2490
Joined: Mon Jun 15, 2009 9:53 am

Re: Edit existing record /permalink

Postby toms » Mon Jan 08, 2018 3:42 pm

Great, I'm looking forward to it!
toms
toms
 
Posts: 438
Joined: Wed Nov 08, 2017 8:57 pm

Re: Edit existing record /permalink

Postby admin » Tue Jan 09, 2018 3:53 am

admin
Site Admin
 
Posts: 2490
Joined: Mon Jun 15, 2009 9:53 am

Re: Edit existing record /permalink

Postby toms » Tue Jan 09, 2018 2:40 pm

Steven,

Thank you so much for the rapid implementation! It works great so far, I just need to do some more testing.

The only drawback is - if that's what you want - that preceding breadcrumbs are not present, or at least there should be a way to go "back" to nuuserhome. (Maybe show a home breadcrumb)

For those who would like the permalink to show up in the browser's address bar, add this piece of javascript under
Home ► Setup ► Header

(That might be something not everyone wants and maybe if this is going to be integrated at all, it should be configurable.)

Code: Select all
function nuOnLoad(){
  if (window.top === window.self) {

    var f = nuCurrentProperties();
       if(window.location.search.indexOf('?i=')>=0)
      window.history.replaceState('',document.title,'?f=' + f.form_id+'&r='+ f.record_id);
       else
      window.history.pushState('',document.title,'?f=' + f.form_id+'&r=' + f.record_id);
   }
}
toms
toms
 
Posts: 438
Joined: Wed Nov 08, 2017 8:57 pm

Re: Edit existing record /permalink

Postby admin » Tue Jan 09, 2018 10:18 pm

toms,

If anyone needs a breadcrumb (back to a place they didn't start) they will have to do it a different way than using these URL parameters.

Steven
admin
Site Admin
 
Posts: 2490
Joined: Mon Jun 15, 2009 9:53 am

Re: Edit existing record /permalink

Postby toms » Tue Jan 09, 2018 11:45 pm

How could this be achieved?

Adding a html link that points to https://xxx/nuBuilder4 won't help much since you'll get this nasty dialog box:
Attachments
back_home.png
back_home.png (4.31 KiB) Viewed 208 times
toms
toms
 
Posts: 438
Joined: Wed Nov 08, 2017 8:57 pm

Re: Edit existing record /permalink

Postby admin » Tue Jan 09, 2018 11:49 pm

toms,

I don't understand what you mean.

Steven
admin
Site Admin
 
Posts: 2490
Joined: Mon Jun 15, 2009 9:53 am

Re: Edit existing record /permalink

Postby toms » Wed Jan 10, 2018 7:14 pm

Let me give you some more/precise details:

1) I open a record of a form using "Auto Login"-parameters: e.g. https://xxx/nuBuilder4/index.php?f=5a54 ... b944&r=142

2) Now I can edit and save the record (Picture "Edit a record")

3) If the user wants to go back to the home screen (Picture "nuhome"), there is no way (no home breadcrumb)
The only way is to hit "logout" and "login" again.

I'm wondering if there is a possibility to add a link (or breadcrumb) to go to "nuhome" without the need to logout and login again.
Attachments
nuhome.png
nuhome.png (15.6 KiB) Viewed 188 times
edit_record.png
edit_record.png (10.49 KiB) Viewed 188 times
toms
toms
 
Posts: 438
Joined: Wed Nov 08, 2017 8:57 pm

Re: Edit existing record /permalink

Postby admin » Thu Jan 11, 2018 4:21 am

admin
Site Admin
 
Posts: 2490
Joined: Mon Jun 15, 2009 9:53 am

Next

Return to General