Hello!
I'm trying to autofill the subject field in the Help Center and hide the subject field. I'd like the subject field to be autofilled differently depending on a selection of a previous drop down box. What I currently have is as follows, but I think I may be referencing the field names incorrectly. I'm having trouble finding anywhere how to correctly reference custom fields and this is my best guess. Any help you can give would be appreciated. Thank you!
$(document).ready(function() {
var selected = $('.form-field.request_custom_fields_12517094980635').parent();
var zip = $('.form-field.request_custom_fields_12516149124891').parent();
var businessName = $('.form-field.request_custom_fields_12515902236315').parent();
$('.form-field.string.optional.request_subject').hide();// Hide subject
$('.form-field.string.required.request_subject').hide(); // Hide subject
if (selected == "Inidividual") {
$('#request_subject').val('New Quote from ' + zip); // Autofill subject
}
else {
$('#request_subject').val('New Quote from ' + businessName); // Autofill subject
}
});