PreSaveAction() in NewForm.aspx in SharePoint 2013 list

"text/javascript">
 function PreSaveAction(){
     if(condition){
         return true;
     }
     else{
         alert('Condition not satisfied to save item');
         return false
     }
 }
Reff: https://asknoor.wordpress.com/2013/02/21/usage-of-presaveaction-function-in-newform-aspx-and-editform-aspx-in-sharepoint/
Advertisements
PreSaveAction() in NewForm.aspx in SharePoint 2013 list