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 the 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
b) Go to Advanced settings and allow management of content type as Yes and click on OK.


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

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

e) Now select the "Hidden" option and click on OK.

That's it. Now you can see Country field is hidden from newitem.aspx page. See the screenshot below.
2) 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 to 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 the Shared Documents library for these files. You can read this article for your reference on how to upload and get the links to 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 our 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!
0 Comments