Posted by: R Manimaran | June 29, 2010

SharePoint PreSaveFunction() in Newform and EditForm aspx

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.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: