Note: Custom ticket forms are only available on the Enterprise plan or as an add-on to the Professional plan.
Suppose you use a custom ticket form in your Help Center to let users register products. You can detect the form and prepopulate its fields when a user opens it in Help Center.
You'll need the ticket form id, which you can find in the form's URL in Help Center. See this example.
The following jQuery example prepopulates the Subject field with "Product registration" and the Decription field with "This is a new product registration". Add the statements to the $(document).ready(function()
function in the JavaScript template:
var ticketForm = location.search.split('ticket_form_id=')[1];
if(ticketForm == 18570) {
$('section.main-column h1').html('Product Registration');
$('#request_subject').val('Product Registration');
$('#request_description').val('There is a new product registration.');
$('#request_subject').parent('.request_subject').hide(); // Hide subject
$('#request_description').parent('.request_description').hide();
$("<p>Please upload your product receipt here.<p>").insertAfter('label:contains("Attachments")'); // Adds text below "Attachments"
}
Comments
0 comments
Please sign in to leave a comment.