How to hide the column display name in the sharepoint list display form using jquery. I do not want to hide entire field. I want the control to be displayed but only the display name has to be hidden.
Kindly suggest any options.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityHow to hide the column display name in the sharepoint list display form using jquery. I do not want to hide entire field. I want the control to be displayed but only the display name has to be hidden.
Kindly suggest any options.
This can be done using CSS only.
.ms-standardheader[id=columnInternalName] { display: none; }
Or hiding all the labels using CSS:
.ms-standardheader { display: none; }
Or by using jQuery (ID):
$(".ms-standardheader[id='columnInternalName']").hide();
Or hide all the labels in the list form
$(".ms-standardheader").hide();
Can be done with plain JS to:
var x = document.querySelector('.ms-standardheader[id="columnInternalName"]');
x.style.display = 'none';
To hide fields in SharePoint list display form using jQuery, Navigate to DispForm.aspx->Edit page -> Insert a Script editor web part and paste the below codes:
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
$(".ms-standardheader:contains('your column name')").hide();
});
</script>
Note: change 'your column name' to your column.
Hide list form field in SharePoint 2013 using jQuery for your reference:
https://www.sharepointdiary.com/2013/04/hide-sharepoint-list-form-field-using-jquery.html