Articles in this section
Category / Section

How to Add a Custom Label Above the Form Dropdown in BoldDesk

Updated:

This guide explains how to add a custom label above the form dropdown in your BoldDesk Customer Portal using Custom JavaScript. By implementing this script, you can display a label such as “Choose a form:” to make the form selection clearer and more intuitive for your customers.

Why Add a Custom Label?

  • Improves usability: Helps customers understand what the dropdown is for.
  • Enhances accessibility: Provides clear context for screen readers.
  • Customizable: You can change the label text to match your brand tone.

Steps to Implement

Follow the steps below to add a custom label above the form dropdown in your BoldDesk Customer Portal.

1. Navigate to Custom JavaScript Settings

  • Go to Admin → Customer Portal → Customization → Custom JS in your BoldDesk admin panel.

    Add Custom JS.png

2. Add the JavaScript Snippet

Insert the following code in the Custom JS section:

const formWrapper = document.querySelector('#form_type_wrapper');
if (formWrapper) {
    const newLabel = document.createElement('label');
    newLabel.className = 'custom-field-label';
    newLabel.textContent = 'Choose a form';
    formWrapper.parentNode.insertBefore(newLabel, formWrapper);
}

Explanation of Code:

  • document.querySelector('#form_type_wrapper') selects the form dropdown wrapper.
  • createElement('label') creates a new label element.
  • insertBefore() places the label above the dropdown.

3. Save and Verify

  • Click Save.
  • Refresh your Customer Portal page.
  • You should now see the label “Choose a form” displayed above the form dropdown.

Before and After Customization

Before

Before Customization.png

After

Once saved, the label will appear above the form dropdown, improving clarity for customers when selecting forms.

After Customization.png

  • You can customize the “choose a form” text to your preferred wording to better suit your requirements.
  • To remove the custom label, delete the custom JavaScript added within the customer portal customization settings.

Frequently Asked Questions (FAQs)

Q1: Can I style the custom label above the form dropdown?
No, you cannot add style to this label.

Q2: Will this affect other forms?
No. The script targets only the element above the form field and not the form.

Q3: Can I add multiple labels?
No, you cannot add multiple labels at the same time.

Related Articles

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied