SharePoint 2013 not hiding Fields

 

After a SharePoiint Foundation 2010 to SharePoint Foundation 2013 upgrade, hidden fields were showing up again UNTIL the JavaScript line was added into the Edit Page via SharePoint Designer 2013.

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript" src="/sites/lng/Style%20Library/jquery/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("nobr:contains('Project Registration Date')").closest('tr').hide();
$("nobr:contains('Drawing Review Date')").closest('tr').hide();
$("nobr:contains('Design Contractor')").closest('tr').hide();
$("nobr:contains('Project Initiation Date')").closest('tr').hide();
$("nobr:contains('Installed By')").closest('tr').hide();
$("nobr:contains('Cat.')").closest('tr').hide();
$("input[title*='B defs. (Initial)']").closest('tr').hide();
$("input[title*='B defs. (Remaining)']").closest('tr').hide();
$("input[title*='A defs. (Initial)']").closest('tr').hide();
$("input[title*='A defs. (Remaining)']").closest('tr').hide();
$("nobr:contains('C.R.s')").closest('tr').hide();
});
</script>

 

 

Add comment

Loading