Hi,
So I have two ticket forms and I wanted to hide the subject and description fields on the second ticket form and also change the sequence of fields.
I am currently using the following code and both of my issues are solved. But the code is inconsistent or buggy. The changes are not permanent. They revert back to default when the page is refreshed or opened again. Clearing the browser cache works but I want the code to be consistent.
//Hiding Subject and description fields
var ticketForm = location.search.split('ticket_form_id=')[1];
if(ticketForm == 360001649199) {
$('.form-field.request_subject').hide(); // Hide subject
$('.form-field.request_description').hide(); // Hide description
}
// rearrange form fields
if(ticketForm == 360001649199) {
$('.request-form label:contains("Full name on account")').parent().insertBefore('.request-form .form-field:has(label:contains("Your email address"))');
$('.request-form label:contains("Date of Birth")').parent().insertBefore('.request-form .form-field:has(label:contains("Your email address"))');
}