Hide listview group headers
Posted: 30 Jan 2019
Is there a way to hide listview group headers in the form? I have a related items section inside the form and need to group by a certain field but would like to hide the header name. I know how to do this in SharePoint 2013 Web part page and script editor but it doesn't seem to work in Forms Designers Javascript framework:
<script src="/SiteAssets/JQuery/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("table.ms-listviewtable > tbody[id^='titl']").each(function () {
var htmlStr = $(this).find("td").clone().html();
//"Name" is the group name
htmlStr = htmlStr.replace(" :", "").replace("CAR Type", "");
$(this).find("td").html(htmlStr);
});
});
</script>
<script src="/SiteAssets/JQuery/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("table.ms-listviewtable > tbody[id^='titl']").each(function () {
var htmlStr = $(this).find("td").clone().html();
//"Name" is the group name
htmlStr = htmlStr.replace(" :", "").replace("CAR Type", "");
$(this).find("td").html(htmlStr);
});
});
</script>