All About SharePoint

Liedong(Ken) Zheng,SharePoint Leader at SIMPLOT

Hide fields on new and edit pages in SharePoint 2010 via JQuery

Posted by ken zheng on September 20, 2011

I need to hide some fields on the group calendar. Here is the code you need:

<script type="text/javascript" src="/slider/jquery-1.6.4.min.js" >
</script>
<script type="text/javascript">
/*
* Hide form fields in SharePoint
*/
$(document).ready(function() {
$('nobr:contains("Recurrence")').closest('tr').hide();
$('nobr:contains("Description")').closest('tr').hide();
$('nobr:contains("All Day Event")').closest('tr').hide();
$('nobr:contains("Workspace")').closest('tr').hide();
});

</script>

Just upload the file to the library and add a cewp to the new/edit form.

Below are the references

http://marijnsomers.blogspot.com/2011/04/ways-to-get-sharepoint-2010-fields-in.html

http://marijnsomers.blogspot.com/2011/04/hide-fields-on-new-and-edit-pages-in.html

Advertisement

2 Responses to “Hide fields on new and edit pages in SharePoint 2010 via JQuery”

  1. Thanks Ken – I’ve blogged a bit more about the same method…> http://sharepointroot.com/2011/09/23/sharepoint-2010-how-to-hide-blog-fields-using-jquery/

  2. [...] Here’s what you need to do – step-by-step.    (thx to Ken Zheng for the idea + sample JavaScript). [...]

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 )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.