document.addEventListener('DOMContentLoaded', function() {
// Select all fieldsets inside Avada form fields
const fieldsets = document.querySelectorAll('.fusion-form-field fieldset');
fieldsets.forEach(fieldset => {
const checkboxes = fieldset.querySelectorAll('input[type="checkbox"]');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', function() {
if (this.checked) {
// Uncheck all other checkboxes within the same fieldset
checkboxes.forEach(other => {
if (other !== this) {
other.checked = false;
}
});
}
});
});
});
});