How to Hide Column Fields in SharePoint 2013

Hi friends, today we are going to learn: How to hide columnĀ fields in SharePoint 2013. There are two methods by which we can hide a column field from new item form. One method is by using SharePoint OTB (out of box) settings and other is by using CEWP (Content Editor Web Part). We can also hide fields in Display item and Edit Item forms.Let us see these methods one by one.

In this example I have Employee Details list and having columns as shown in below screenshot. Here we are going to hide a column named Country.

1) Using OTB settings for hiding column fields

a) Go to list settings

List settings

b) Go to Advanced settings and allow management of content type as Yes and click on OK.

List Advanced Settings

Allow management of content type

c) Now click on Content type which you have created or predefined. In my case it is Item, so click on Item.

Content type

d) Now click in column name which you want to hide from newitem.aspx.

Column fields

e) Now select “Hidden” option and click on OK.

Hide column fields

Thats it. Now you can see Country field is hidden from newitem.aspx page. See screenshot below.

Employee Details new2) Using CEWP to hide column fields in SharePoint 2013

Now we will see how to hide column fields using CEWP (Content Editor Web Part). I hope you are aware of adding CEWP into a sharepoint page. You can refer this article on adding CEWP.

Before proceeding further make sure that we are using javascript for making these changes. So you need to upload jquery.min.js and sputility.min.js files in your document library. I have used Shared Documents library for these files. You can readĀ this article for your reference on how to upload and get the links of those files.

Copy the following script into CEWP and change the red colored links with your own one. You can use this script to hide fields in DispForm.aspx and EditForm.aspx also.

<script src="/examplesite/Shared%20Documents/jquery.min.js"></script> 
<script src="/examplesite/Shared%20Documents/sputility.min.js"></script> 
<script>
$(document).ready(function(){
{
 SPUtility.GetSPField('Country').Hide();
};
});
</script>

If you like this article, please share it with your friends and like or facebook page for future updates. Subscribe to our newsletter to get notifications about our updates via email. If you have any queries, feel free to ask in the comments section below. Have a nice day!

Leave a Reply

Your email address will not be published. Required fields are marked *