¿Cómo se desactivan los campos de asunto y descripción en el formulario de solicitud?



Editado 20 feb 2025


9

0

238 comentarios

I need to create several forms for our internal staff to complete. The forms are different from each other, and I want to customize them by:

  1. Changing the instructions for filling out the Subject line
  2. Creating my own custom fields instead of using the existing subscription fields (which don't fit my new forms)

Is there a way to remove these default elements and create my own custom fields that better suit my forms?

0


Seems like since the implementation of Copenhagen 4.2.7 (or earlier) old methods of hiding and auto-populating Subject line and Description field no longer work. 

 

Please, if anyone has any advice on how to hide and auto-populate the Subject line and description field of a specific form, I'd greatly appreciate it. 

0


It seems that since latest Zendesk update templating v4 that was released last July, this needs to be done in new_request_page.hbs instead of script.js. I have a support ticket on this.

0


Thank you Jan,

 

I am following that post. I hope there is a solution

0


Hi, everything was working and then we changed theme. I copied the code from script.js and the one from document_head.hbs

 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

 

Is it supposed to work with all the themes? I don't understand why it was working before and not anymore this time.

0


Hi All, 

 

very new to Zendesk and not very strong at coding. I'm basically looking for a way to hide the Subject, Attachment and Description fields on a specific form.

 

Using Copenhagen Theme version 4.1.0

Templating API v4

 

I've landed on this but not sure exactly where I should insert the code. Can anyone give me some directions please?

 

var ticketForm = location.search.split('ticket_form_id=')[1];

if(ticketForm == 28674919414929) {
$('.form-field.request_subject').hide(); // Hide subject
$('.form-field.request_description').hide(); // Hide description
$('.form-field.string.optional.request_cc_emails').hide();// Hide CCs 
$('.form-field label:contains("Attachments")').hide(); // Hide label for Attachments
$('#upload-dropzone').hide(); // Hide upload box for Attachments
$('#request_subject').val('New EAP Appointment Request'); // autofill subject
$('#request_description').val('See details in the fields to the left'); // autofill description
}

 

I've basically added it at the bottom of my Script.js file

0


How to do it in Templating API v4

0


Anybody successfully modified this for Copenhagen v4?

0


Hi all - I was able to successfully autofill and hide my description field, but when some end users try to submit a ticket, the “Description: cannot be blank” error" flashes and does not let them submit the ticket. This is only happening to some people, not all. Has anyone dealt with this before? Is there an error in the code or is it something with the end user? Thanks in advance!

0


Iniciar sesión para dejar un comentario.