Skip to content

Commit

Permalink
Fix radio field bug for static forms
Browse files Browse the repository at this point in the history
  • Loading branch information
britneywwc committed Nov 27, 2024
1 parent 780be4c commit 22927dc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions static/js/src/static-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,24 @@ function setUpStaticForms(form, formId) {
message += "\r\n\r\n";
});

const radioFieldsets = document.querySelectorAll(
".js-remove-radio-names",
);
if (radioFieldsets) {
radioFieldsets.forEach((radioFieldset) => {
const radioInputs = radioFieldset.querySelectorAll(
"input[type='radio']",
);
radioInputs.forEach((radioInput) => {
radioInput.removeAttribute("name");
});
});
}

if (formFields.length) {
commentsFromLead.value = message;
}

return message;
});
}
Expand Down

0 comments on commit 22927dc

Please sign in to comment.