Total Pageviews

14 Jun 2013

Run Custom Function before "Save" Button is Clicked with PreSaveAction. SharePoint 2010

Add Javascript function to the page:

function PreSaveAction() 

    // your custom code goes here
    return true;  // OK to proceed with the save item }

For more information, check this post:
http://edinkapic.blogspot.ru/2007/10/add-javascript-date-validation-into.html

1 comment:

  1. Does not seem to work in SharePoint 2013. The view-source shows... input type="submit" name="ctl00$PlaceHolderMain$ctl00$RptControls$btnOK" value="Save" onclick="if (SPClientForms.ClientFormManager.SubmitClientForm('WPQ2')) return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$PlaceHolderMain$ctl00$RptControls$btnOK", "", true, "", "", false, false))" id="ctl00_PlaceHolderMain_ctl00_RptControls_btnOK" class="ms-ButtonHeightWidth" /> ...so there is, apparently, no hook to PreSaveAction. Do you hvae any suggestions for SharePoint 2013?


    ReplyDelete