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
Chris OConnor (@GrumpyWookie) said
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/
SharePoint 2010 – how to hide BLOG fields – using jQuery « SharePointRoot said
[...] Here’s what you need to do – step-by-step. (thx to Ken Zheng for the idea + sample JavaScript). [...]