Welcome to the nuBuilder Forums!

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

Edit existing record /permalink

Questions related to using nuBuilder Forte.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Edit existing record /permalink

Unread post by toms »

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:
http://forums.nubuilder.cloud/viewtopic.p ... al+#p14966

Any chance to implement it in V4? This would ease things a lot.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Edit existing record /permalink

Unread post by admin »

toms,

Leave it with me.

I have an idea...

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Edit existing record /permalink

Unread post by toms »

Great, I'm looking forward to it!
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Edit existing record /permalink

Unread post by admin »

toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Edit existing record /permalink

Unread post by toms »

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);
   }
} 
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Edit existing record /permalink

Unread post by admin »

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
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Edit existing record /permalink

Unread post by toms »

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:
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Edit existing record /permalink

Unread post by admin »

toms,

I don't understand what you mean.

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Edit existing record /permalink

Unread post by toms »

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.
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Edit existing record /permalink

Unread post by admin »

Locked