Save and continue in Edit-Form

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Mapleleaf
Posts: 29
Joined: Tue Oct 25, 2016

30 Mar 2020

Hi,

I would like to give users the possiblility to save their input in edit-form and continue with edit-form. The Thing I Need is discribed here quite well:

https://community.nintex.com/t5/Nintex- ... td-p/57485


I found this code somewhere in the forum:

function SaveContinue() {
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Item_Edit.aspx?ID=');
console.log(uri);
fd.sourceFormParam(uri);
return true;
};

At first sight it seems like if it works. You can press F5 and changes are in the form. But the input is not really saved.
For example calculated fields which refer to this fields are not re-calculated. If you hit cancel-button the entered data is gone.

Is there any possibility to get this done?

Greetings and stay healthy

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

31 Mar 2020

Hello Mapleleaf,

This forum is not related to Forms Designer.

Please see the How to open edit form right after creation of an item in SharePoint for the code example.

Mapleleaf
Posts: 29
Joined: Tue Oct 25, 2016

01 Apr 2020

Hello mniktina,
the link was only for explanation of what we want to achieve. The code-example unfortunatly does not provide the functionality we need here. Maybe there is a way to reach this:

Save entries in edit-form and reload/refresh form without closing.

Thank you for your Support.

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

01 Apr 2020

Hello Mapleleaf,

You can use the code from the article to redirect the user back to the edit form after the form is submitted.

Code: Select all

fd.onsubmit(function() {
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Item_Edit.aspx?ID=');
fd.sourceFormParam(uri);
return true;
});
If you want to create a custom button, you can use the same code, just add

Code: Select all

fd.save().click();
at the end of the code.

wdeffner
Posts: 30
Joined: Thu Sep 22, 2016

14 Apr 2020

Hello Mniktina,

we just combined:

Code: Select all

fd.onsubmit(function() {
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Item_Edit.aspx?ID=');
fd.sourceFormParam(uri);
return true;
});
fd.save().click();
but nothing happened.

Is it right to place the code in "Common / Onclick" of the button?

Image

Thank you, Wolfgang
Attachments
common.png
common.png (2.62 KiB) Viewed 4368 times

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

14 Apr 2020

Hello wdeffner,

Yes, you need to paste the code to Common >> onClick

Which browser are you using? Do you get any errors in the browser console(F12)?

wdeffner
Posts: 30
Joined: Thu Sep 22, 2016

15 Apr 2020

Hello Mniktina,

we checked again and found a small error - now it works!

Thank you!
Wolfgang

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests