Hello all,
I can't get this code to work on my public form, but basically I'm trying to hide a group of fields that I've set to be the class 'field-to-hide' upon change of a toggle. The toggle is named 'single_applicant'. Here is my code:
fd.rendered(function() {
function hideApplicant2() {
if (fd.field('single_applicant').value == true) {
// Show the Due Date field
$(fd.field('.field-to-hide').show();
} else {
// Hide the Due Date field
$(fd.field('.field-to-hide').hide();
}
}
fd.field('single_applicant').$on('change', hideApplicant2);
hideApplicant2();
});