Category / Section
How to Restrict Editing of Subject and Description in the Customer Portal
Published:
Sep 27, 2024
You can restrict editing of the ticket subject and prevent deletion of the description in the customer portal by using custom CSS and JS. To implement this, navigate to Admin > Customer Portal > Customization and paste the following custom JS code:
Custom JS code
const regex = /\/support\/tickets\/\d+/;
if (regex.test(window.location.href)) {
let intervel = setInterval(function () {
var obj = document.querySelector("#ticket-title-inplace-edit")
if (obj && obj.ej2_instances && obj.ej2_instances[0]) {
obj.ej2_instances[0].disabled = true;
clearInterval(intervel);
}
}, 200);
}
Custom CSS code
#tickets-comments-summary {
.ticket-delete {
display: none;
}
}
#commentscardlayout {
.more-option.action-button {
display: none;
}
Guide to Pasting the custom CSS and JS code
To learn where to paste the above custom JS code, refer to this article.
Related article
Did not find the solution
Contact Support