Category

How to Restrict Ticket Subject Editing and Description Deletion in the Customer Portal

Updated:

You can use custom JavaScript and CSS to prevent customers from editing ticket subjects and accessing options for deleting ticket content in the BoldDesk customer portal. The JavaScript disables the ticket subject editor, while the CSS hides the applicable deletion control on the ticket details page.

Customer portal customization settings, including custom CSS and JavaScript, are configured separately for each brand.

Add the Custom JavaScript

The following JavaScript checks whether the customer is viewing a ticket details page. When the ticket subject editor becomes available, the script disables it.

const ticketDetailsPageRegex = /\/support\/tickets\/\d+/;

if (ticketDetailsPageRegex.test(window.location.href)) {
    const interval = setInterval(function () {
        const subjectEditor = document.querySelector(
            "#ticket-title-inplace-edit"
        );

        if (
            subjectEditor &&
            subjectEditor.ej2_instances &&
            subjectEditor.ej2_instances[0]
        ) {
            subjectEditor.ej2_instances[0].disabled = true;
            clearInterval(interval);
        }
    }, 200);
}

The script:

  • Checks whether the current URL follows the customer portal ticket details URL pattern.
  • Searches for the ticket subject editor.
  • Waits until the subject editor is available on the page.
  • Disables the subject editor.
  • Stops checking after the subject editor has been disabled.

Add the Custom CSS

The following CSS hides the applicable deletion control from the ticket conversation area:

#tickets-comments-summary .ticket-delete {
    display: none !important;
}

#commentscardlayout .more-option.action-button {
    display: none !important;
}

The CSS hides the applicable ticket deletion control in the ticket comments summary.

Apply the Custom CSS and JavaScript

For instructions on adding the custom CSS and JavaScript to the customer portal, explore further information on How to Customize the BoldDesk Customer Portal.

Verify the Customization

After publishing the custom CSS and JavaScript, open an existing ticket in the customer portal and compare the ticket details page before and after the customization.

Before Customization

Before the customization is applied:

  • The ticket subject can be edited.
  • The applicable deletion control is displayed in the ticket description and conversation area.

Before_Customization.png

After Customization

After the customization is applied:

  • The ticket subject cannot be edited.
  • The targeted deletion control is hidden.

After_Customization.png

The customization applies only to the customer portal for the selected brand. It does not prevent authorized agents from editing or managing tickets in the BoldDesk Agent Portal.

Troubleshooting

The Ticket Subject Can Still Be Edited

Confirm that:

  • The JavaScript was added to the correct brand’s customer portal.
  • The custom JavaScript was saved and published.
  • The customer is viewing a URL that matches the ticket details page pattern.
  • The browser console does not display a JavaScript error.
  • The selector #ticket-title-inplace-edit still matches the ticket subject editor.

Other Required Actions Are Hidden

The .more-option.action-button selector hides the targeted More options button and may remove access to other actions available through that button.

Remove or adjust this CSS rule if customers still need to access any of those actions.

The Customization Works for One Brand but Not Another

Customer portal customization settings are brand-specific. Add and publish the custom CSS and JavaScript separately for each brand where the restrictions are required.

The Customer Portal Does Not Load Correctly

Temporarily remove the custom JavaScript and CSS, save the changes, and reload the customer portal. Review the code for syntax errors before adding it again.

Permission

To restrict ticket subject editing and description deletion in the customer portal, an agent must have the Manage Settings permission in the Admin Module assigned to their role. Explore Managing Roles and Permissions in BoldDesk for more insights.

Permission_to_Manage_Settings.png

Frequently Asked Questions

  1. Can I prevent customers from editing ticket subjects in the customer portal?
    Yes. You can use custom JavaScript to disable the ticket subject editor on ticket details pages.

  2. Can I hide ticket deletion controls from customers?
    Yes. You can use custom CSS to hide the applicable deletion and More options controls in the customer portal.

  3. Does this customization affect the Agent Portal?
    No. The customization applies only to the customer portal for the selected brand.

  4. Does this customization create a new ticket permission?
    No. The customization changes the customer portal interface. It does not create or modify a server-side permission.

  5. Can I apply the customization to only one brand?
    Yes. Customer portal customization settings are configured separately for each brand.

  6. Can the customization stop working after a product update?
    Yes. Custom CSS and JavaScript depend on the customer portal’s HTML structure and selectors. Review and retest the code after significant customer portal updates.

  7. How can I restore the default customer portal behavior?
    Remove the custom CSS and JavaScript from the customer portal customization settings, then save and publish the changes.

Related Articles

  1. How to Customize the BoldDesk Customer Portal
  2. How to Disable Ticket Creation in the Customer Portal
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found