Skip to main content
Solved

How to hide one values in dropdown field?

  • April 30, 2024
  • 1 reply
  • 83 views

Forum|alt.badge.img+2

What would be the script to hide one value from the ticket Type field on the customer portal?

E.g. to hide value ‘Complaint’ from the Type field.

 

Best answer by acn084

You’ll have to inspect the form to get the custom field attribute name. Then add a JavaScript on the submit ticket portal template 

 

<script type="text/javascript">
  document.addEventListener("DOMContentLoaded", function() {
          jQuery('#helpdesk_ticket_custom_field_type_selection_3014498 option[value="complaint”]').remove();

  });
</script>

 

 

 

 

1 reply

acn084
Skilled Expert
Forum|alt.badge.img+3
  • Skilled Expert
  • Answer
  • May 7, 2024

You’ll have to inspect the form to get the custom field attribute name. Then add a JavaScript on the submit ticket portal template 

 

<script type="text/javascript">
  document.addEventListener("DOMContentLoaded", function() {
          jQuery('#helpdesk_ticket_custom_field_type_selection_3014498 option[value="complaint”]').remove();

  });
</script>