Skip to main content

I have tried to hide elements in the items requested pane of the catalog (the fields I want to hide can be seen below).

I have hidden the fields I want to hide by adding the below to our custom stylsheet:

 

bodyypage="catalog_item"] #side-modal #side-modal-content .place-request-container .request-someone-container .request-container{
    display: none;

body>page="catalog_item"] #side-modal #side-modal-content .place-request-container .default_requester .req-text-container {
  display:none;
}

 

body  display:none;
}

 

The problem with this is that it hides these for every single catalog item (as I would expect) but I now want to hide these just for a particular catalog item e.g. /support/catalog/items/269 - is this possible? If so does anyone know how to do it? I’ve tried writing scripts and adding them to the Footer area but none of these appear to work.

I have worked this out using an answer in this thread.

 

I added the below to the Page Layout area which gave me what I wanted:

 

<script>
  jQuery(document).on('SideModalOpen', function() {
setTimeout(function() {
  var current_loc = window.location.pathname;
  var required_loc = "/support/catalog/items/269";
  if (current_loc == required_loc) {
  jQuery(".request-someone-container").hide();
    jQuery(".requester-field-section").hide();
  jQuery("#requester_email").prop("disabled",true)
        }
  });
  });
    </script>