Solved

Add Static Text to New Ticket

  • 10 April 2023
  • 5 replies
  • 107 views

Userlevel 1
Badge +3

Hello,

We want to add a title for a section of checkbox fields to give our customers instruction. It would appear above the checkboxes and say something like “Please indicate which expenses you incurred”. I’ve included a screenshot of the section of this ticket form. 

 

Thank you!

Anna

icon

Best answer by aravind.sundararajan 10 April 2023, 19:28

View original

5 replies

Userlevel 4
Badge +12

Hello @brownae Thanks for posting this on the Community. Here’s how you can add static text to appear above the section:

 

  1. Get the ID of the field above the section. In this case, the field would be “Travel Start Date”. Here’s how the ID of the element would look like (if you use inspect element on the ticket screen):

    Grab the ID value from the inspect window ie. helpdesk_ticket_custom_field_cf_store_1952170
     
  2. Add the following code to the Admin > Portals > Customize portal > Portal Pages > Submit ticket section.  
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery('#helpdesk_ticket_custom_field_cf_store_1952170').after("<b>Please indicate which expenses you incurred</b>");
    });
    </script>
  3. Replace the ID (helpdesk_ticket_custom_field_cf_store_1952170) with the corresponding ID of the element on the ticket screen.
  4. Here’s how the static text would appear on the screen:
     

 


Cheers!

Userlevel 1
Badge +3

Thanks, Aravind. The static text is appearing right next to the field above: 

 

Userlevel 4
Badge +12

Hello @brownae Since “Travel End Date” is a text field, please modify the code to insert the text after the input field.

 

jQuery("#helpdesk_ticket_custom_field_cf_to_date_2667468").parent().after("Please indicate which expenses you incurred");

 

Cheers!

Userlevel 1
Badge +3

That worked- thanks so much!

Badge

I have the same problem, tried the JQuery solutions but they don't seem to work anymore.
Are there other work arounds for this limitation?
 

Reply