I've used PreSaveAction successfully in the past, but now I'm working with a CSRListForm and neither one of these will fire off. Even if I use just a simple alert message.

I know the CSRListForm causes a lot of standard things to not work. Does it invalidate PreSaveAction and PreSaveItem as well?



Sharpoint 2016 On Prem

I'm saving using this method:


The standard Save button has disappeared so I can't use this:


My code is based off of this:


Thank you

  • With which version of SharePoint do you want to use CSR? Feb 8, 2019 at 4:07

2 Answers 2


The problem you were having is because you weren't using the standard save button. The standard save button looks kind of like this:

<input name="somereallylongname" value="Save"
    onclick="if (!PreSaveItem()) return false;if (SPClientForms.ClientFormManager.SubmitClientForm('WPQ2')) return false;//etc" 
    target="_self" type="button">

Notice that the onclick event starts with if(!PreSaveItem()) return false;, and then it does if (SPClientForms.ClientFormManager.SubmitClientForm('WPQ2')) return false;. You said you're doing:


to save the form, but that's only a portion of the logic, removing much of the validation. If you had done:

if (!PreSaveItem())
    return false;
if (SPClientForms.ClientFormManager.SubmitClientForm('WPQ2'))
    return false;

from your own button, validation would have worked the way you expected, including PreSaveItem. All OOB forms in 2016 are CSR forms, and they still work fine with PreSaveItem/PreSaveAction.

  • Thanks Joe. I think I could have gotten this to work but so many other things were affected by using the CSRListForm that I decided not to use it.
    – Ice Cube
    Mar 11, 2019 at 19:32
  • 1
    You're welcome. I knew by the time I saw it that you had already moved on to an hillbilly forms, but figured I'd share what I knew.
    – Joe McShea
    Mar 12, 2019 at 18:28

After fighting with this for a few days I decided to abandon the CSRListForm method and use the hillbilly.js method specified here:


With this method the following all work:

Standard Save and Cancel; Attach File; PreSaveItem; PreSaveAction

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.