.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

SharePoint 2010: Hide Columns in SharePoint New, Edit and Display Forms

Posted By:Sagar Pardeshi       Posted Date: December 29, 2013    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

SharePoint 2010: Hide Columns in SharePoint New, Edit and Display Forms



Hiding columns in SharePoint is nothing new really, there have been several articles written on this topic. The approach for doing this, however, does inspire some debate in terms of what the best practice is. Let's say we can agree that there are three ways to get this done:

1.     Using the built in content types to specify which columns you wish to be hidden.

2.     Using jQuery and a content editor web part to hide the columns as desired.

3.     Hide the columns programmatically using code.


introduce these hidden columns on your New and Edit forms but not your Disp form as an example. Or what if your scenario requires that they are hidden from all default NewEdit and Disp forms, but you have some custom SharePoint Designer disp forms that you've created that those fields need to be visible on. The content type approach will hide the column for all forms and so that won't always work. We need something more granular.


Code Step :



<script language="javascript" src="/JS/jquery-1.9.0.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">


 Please note that I had to add quotes around the tr tag for this to work for me.

The final approach uses some custom code and the object model to hide columns for a given list. Now I'm not entirely sure how this works with custom forms besides the NewEdit and Dispforms, and until I have time to try out, I won't know the answer to that. It's worth mentioning because it does give you some granularity in that you can specify hidden properties per form.



 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend