Save Form with out Closing It

Dear @phil,

By default, the append-only history refreshes only after the saving process will finish. We can add JS API for refreshing the append-only history for you, it will require purchasing 1 support hour: https://plumsail.com/forms/store/

Dear @AlexZver

Yes please add this JS API. How I have to proceed for this? What is the timeline from you side?

Dear @phil,

It requires 2 working days after purchasing. Before purchasing the support minutes (https://plumsail.com/forms/store/), please send us the detailed requirements to support@plumsail.com.
Also, please provide the order number after the payment.

I added this code and now the form won’t save progress when open not in the panel.

I need it do save either opened via panel or via full page browser. Can this be done?

Stefanie,

Please use the following code. Paste it in Javascript editor in the New Item view. It will redirect the user after submission to the Edit Form.

fd.spSaved(function(result) {
    var listId = fd.spFormCtx.ListAttributes.Id;
    var itemId = result.Id;

    //replace "https://domain.sharepoint.com/sites/sitename/subsite" with path to your site
    //PageType=6 means Edit Form
    result.RedirectUrl =
        "https://domain.sharepoint.com/sites/sitename/subsite/_layouts/15/listform.aspx?PageType=6&ListId="
        + listId + "&ID=" + itemId;
});

You can also use this code in the Edit Item view to keep the Edit form open on save.

fd.spSaved(function(result) {
    result.RedirectUrl = null;
});

I already have that code in my form.

The issue is the Save button

fd.save();
fd._spSaved = [] works in the panel, saves the form and keeps it open
Does not work in the full browser, saves the form and closes it

Then fd.save(); works in full browser but not the panel

Stefanie,

Please use the following code, paste it in the JavaScript Editor.
It will prevent redirection on save both in the panel and full window views.

fd.spBeforeSave(function() {
  fd.source = window.location.href;
});
fd._spSaved = []

Thank you, I knew I was doing something wrong.

The last part is when you close the panel form the changes do not reflect back in the list view. The user has to refresh the page. Is that as expected?

@cortese98,

Unfortunately, there is a bug in the latest Microsoft update, and we couldn’t find a workaround. We’ve contacted Microsoft, they’ve told us that’s it’s not a business-critical issue, and it will be fixed in 3 months only. We will continue researching workarounds, but right now there is no auto-refresh in most cases. Target release should support List Item update when the Title changes, though, but not other fields.

1 Like

@mnikitina

This is definitly a business critical issue and we are waiting for a solution from Microsoft!
Thank you for your support and effort in this!

1 Like

@mnikitina
hi, how can i make one button save only, without redirect and continue editing. and second button with submitting and closing form(fd.save()). How to make both to work ?

p.s. i make in save button

    fd.spSaved(function(result) {
        result.RedirectUrl = window.location.href;
    })
    return fd.save();

and in submit button

fd.spBeforeSave(function (spForm) {
    fd.field('IDWorkflow').value = "returnareManager";

    return fd._vue.$nextTick();
});
return fd.save();

is it correct? or there is a better solution?

Hello @ixxxl,

To prevent redirection on save, use this code:

fd.spSaved(function(result) {
    result.RedirectUrl = null;
});

return fd.save();

To save and close, use this code:

var redirect = fd.source;
fd.spSaved(function(result) {
    result.RedirectUrl = redirect;
});

fd.spBeforeSave(function (spForm) {
    fd.field('IDWorkflow').value = "returnareManager";

    return fd._vue.$nextTick();
});
return fd.save();
1 Like

@mnikitina
thank you !!!

1 Like

@mnikitina
Good day!
After save without redirect, the form scroll at the top.how to prevent scroll the top? And to remain where user pressing custom button save and to continue editing other fields? Not from begining to scroll till middle form

@ixxxl,

You can prevent scrolling using the code:

fd.spSaved(function(result) {
    result.RedirectUrl = null;
});

var dang = fd._showAlert;
fd._showAlert = function () {};
return fd.save();
fd._showAlert = dang;
2 Likes

@mnikitina
Thank you !

1 Like