Hiding Fields by Customizing Content Types in SharePoint

By:   |   Updated: 2010-07-27   |   Comments (2)   |   Related: > Sharepoint

Problem

At certain times, we want to hide the details in user input forms, but also at the same time we want to maintain the data in the backend. In SharePoint we could use the list to store data. The default forms provided in the list like NewForm, Editform and others contain all metadata (fields). Now the problem is if you want to remove fields from the forms, either you need to remove columns from the list or you need to create new forms to replace the default forms.

Solution

To remove specific fields from the default list forms, we need to hide the metadata (columns) from the content type. We will walk through a sample list which contains a couple of fields in the list, but not all fields in the default forms after implementing the solution.

This list basically contains information of an employee like name, id and age. If we create a new employee in the same list, by default it would ask for all the details.

To hide any of the fields (like in my case EmpID), goto Settings > List Settings

Goto Advance settings

Select "Yes" option under the question "Allow management of content types?" to view the content type to which the field belongs.

Click for full size image

Select the content type like "Item" in my case.

Click for full size image

Select the metadata (column) you want to hide like EmpID in my case.

In "Column Settings" Category, there will be three options i.e. Required, Optional and Hidden. Select "Hidden" and press "OK" to hide the field.

Now when we go back to the new item form, the field does not show up.

With this, we could use this solution to decide what information we need users to input and what information we need to display in the default list forms provided in SharePoint.

Next Steps
  • Check out MSSQLTips.com for great information about Microsoft SQL Server.


Last Updated: 2010-07-27


get scripts

next tip button



About the author
MSSQLTips author Rahul Mehta Rahul Mehta is a Project Architect/Lead working at Tata Consultancy Services focusing on ECM.

View all my tips




Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name
*Email
Email me updates

Signup for our newsletter

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.





Thursday, May 17, 2018 - 6:47:18 PM - Heena Back To Top

Hello,

Can you please guide me for Password masking in SharePoint list field. I am using SharePoint 2013 and sharepoint (wsp) editing in visual studio 2017. its in Schema.xml and element.xml files. I tried to use java script for password masking but it didn't allow me to do anything in .xml. Need help.

Thanks, Heena


Thursday, February 22, 2018 - 5:03:29 PM - Pari Back To Top

Hello,

 I would like to do password mask in sharepoint 2013 list field. Want to show ***** not real password.

Can you please guide me for this?

 

Thanks,

Pari



download

























get free sql tips

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



Learn more about SQL Server tools