Button on Edit Mode to Save the Form and revert to Display

I have a request to have a button that will allow the form to be saved in edit mode but instead of closing the form it will change to display mode so the user can view the changes that have been made.

Hi Stefanie,

Let me clarify, do you want one button that saves the form and redirects to Display form and another button with a default saving process? Or just the first button?

Just the first button, one button that saves the form and redirects to Display form

I don’t want it to impact default saving processes

Hi Stefanie,

To implement this functionality, just add this code in the button Onclick property:

fd.save();

Also, you need to override fd.spSaved() event handler, you can find examples here: https://plumsail.com/docs/forms/how-to/redirect-sp-save.html

How could be the first option be done? I need two fd.save(); event handlers. One for saving and reopen in edit and one for the normal fd.save(); with redirect to a page.

Let me clarify, do you want one button that saves the form and redirects to Display form and another button with a default saving process?

Hello @DanielB,

You can add buttons to the form and add custom code to its Onclick settings that changes the behavior under spSaved event.
image
For instance:

fd.spSaved(function(result) {
    result.RedirectUrl = 'https://samllsharik.sharepoint.com/sites/Main/_layouts/15/listedit.aspx?List=%7BB64DAA59%2D7F0E%2D4010%2D8131%2D382407723E46%7D';
});

return fd.save();

Simple but perfect..... Thanks a lot!

1 Like