PreSaveFunction()
This function is used to Execute any javascript function before saving a list item. Return value from this function determines the Saving action of an list item.
Example: Place a ContentEditor Webpart in Newform.aspx and add this code
<script language=”javascript”>
Function PreSaveAction()
{
//you can place your validation function here.
return false; //the form will not get submitted
retrun true; //the form will get submitted.
}
</script>
You can add the content Editor webpart to Newform.aspx using Sharepoint designer or through editing the Page. But, how to edit the page and add a content editor web part?
Check my next post.
Leave a comment