Page 1 of 1

Save and continue in Edit-Form

Posted: 30 Mar 2020
by Mapleleaf
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

Re: Save and continue in Edit-Form

Posted: 31 Mar 2020
by mnikitina
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.

Re: Save and continue in Edit-Form

Posted: 01 Apr 2020
by Mapleleaf
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.

Re: Save and continue in Edit-Form

Posted: 01 Apr 2020
by mnikitina
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.

Re: Save and continue in Edit-Form

Posted: 14 Apr 2020
by wdeffner
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

Re: Save and continue in Edit-Form

Posted: 14 Apr 2020
by mnikitina
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)?

Re: Save and continue in Edit-Form

Posted: 15 Apr 2020
by wdeffner
Hello Mniktina,

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

Thank you!
Wolfgang