Wednesday, June 12, 2019

Hide fields on a SharePoint list form

When you create a list in SharePoint, there may be certain fields that you wish to hide on the list forms.  One example of this is a request form.  The end user fills out the form for you to process.  You have some variables associated with that form, such as "status", that you don't want the end user to be able to see or change.


The code below hides form fields that are specified in the "hideFields" function.  The code does not require any additional supporting classes such as jquery. This code can be put in a content editor web part on your form, or added directly to the form in SharePoint designer.


Be aware that the field names that your are going to hide are the SharePoint names for that field, not necessarily the name presented in the list.  If you open your list and go to list settings, placing your pointer over the variable name will show the SharePoint name in the link:


/news/_layouts/FldEdit.aspx?List=%7B354E90D9%2D5763%2D491F%2DAA44%2DFA42D5838B4C%7D&Field=Title


This fields name is "Title" even though in the SharePoint list it is listed as "Headline".



1 comment:

Magistral699 said...

Thanks for the enlightening tech insights! Worried about computer mishaps? No need! ITFUX24 has your back. Opt for their notebook reparatur service and enjoy a discount right away!

Post a Comment