How can I disable the subject and description fields from the request form?



Edited Feb 07, 2025


9

235

237 comments

Thanks, 1263169183150! I just tried this code and it still only pulls in the first custom field into the subject. Custom field 2 and 3 are missing, but it does have the " hey" at the end of the subject line on the ticket. That was the same issue I was having. Puzzles me for sure!

Form link if you'd like to have a look. 

0


Okay, so remove previous code and use this one,  it's working as you wanna do:

$("#request_custom_fields_0000000000,#request_custom_fields_1111111111,#request_custom_fields_222222222").keyup(function(event) { 
var a = $("#request_custom_fields_0000000000").val();
var b = $("#request_custom_fields_111111111").val();
var c = $("#request_custom_fields_22222222222").val();
   $("#request_subject").val(a +" "+ b + " "+c+" " + " hey"); 
});

$('.request_subject').hide(); 


000000000 -- My custom text field IDs, your custom fields have different ids, so update those.
111111111 -- My custom text field IDs, your custom fields have different ids, so update those.
22222222 -- My custom text field IDs, your custom fields have different ids, so update those.

 

Thanks

0


Hi 1263169183150! That looks like it's only one custom field added to the hidden subject, which is how we currently have it working. What I need is to have 2-3 custom fields added to the subject. Something along the lines of 

var a = custom field 1
var b = custom field 2
var c = custom field 3

subject = .val(a  + " " + b + " " + c + " Request")

I've tried a couple different pieces of coding and can't make it work. 

0


Hi Teresa, try this code snippet:

 $("#request_subject").val(" Request"); 
$("#request_custom_fields_1234").keyup(function(event) {
  var a = $(this).val();
   $("#request_subject").val(a + " Request"); 
});
$('.request_subject').hide(); 

0


1263169183150

Below is a snippet of code that we use to hide the subject, but then also add a field on the form to the hidden subject line: 

  $("#request_custom_fields_12345").keyup(function(event) { 
var a = $(this).val();
 $("#request_subject").val(a + " Request");
});
  $('.form-field.string.required.request_subject').hide();

I'm trying to figure out how to add two additional fields to the subject line, in addition to the one already added, but can't seem to make it work. Would you happen to have any ideas? Ty!

 

 

0


Hey Marsy Franco (admin),

There was an extra curly bracket which I removed, now use the below code:

document.addEventListener("DOMContentLoaded", function () {
    
    function hideDescriptionField(){
    var descriptionWarpper = document.querySelector('.form-field.request_description');
   var descriptionField = document.querySelector('#request_description');
    descriptionField.innerHTML = 'PostSurvey';
    descriptionWarpper.style.display= "none";
}
  hideDescriptionField();
  
  
});

0


Hello, is there someone that can help me.  I am trying to hide the attachments/upload ticket field box on one forms page and having trouble coding for this.  I was able to add a document event listener to hide the description field box, but cannot get it to work for the attachments field id.

Here is the code I am using for the description field box:
document.addEventListener("DOMContentLoaded", function () {
    
    function hideDescriptionField(){
    var descriptionWarpper = document.querySelector('.form-field.request_description');
   var descriptionField = document.querySelector('#request_description');
    descriptionField.innerHTML = 'PostSurvey';
    descriptionWarpper.style.display= "none";
}
  }
  hideDescriptionField();
});

0


1263169183150 thank you for trying! Back to the drawing board. :) 

0


Hi Nicole, 

I tried to get the solution of your query but I think it's not possible by my side.

 

Thanks

0


1263169183150 not sure if you can help with this one, or if this is the right place to ask. We have a field that is an urgency value. Is there any way to have the field selection populate at the beginning of the ticket subject? Basically, amend what the end user states for the subject to include this value. 

Info: 

Form: (ticket form)

Field ID: (ticket field)

Thank you in advance for any help you can provide!

0


Sign in to leave a comment.