Skip to content

Commit

Permalink
There is no checkbox setting for marking "other" as default selected,…
Browse files Browse the repository at this point in the history
… skip it when synchronising the selected options
  • Loading branch information
lucasnetau authored and kevinchappell committed Oct 5, 2022
1 parent 42dd6cf commit 013d0f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,7 @@ function FormBuilder(opts, element, $) {
} else {
prevOptions = document.getElementsByName(e.target.name)
forEach(prevOptions, i => {
if (prevOptions[i].classList.contains('other-option')) return //Cannot set other as a default checked
const selectedOption = options[i].parentElement.childNodes[0]
selectedOption.checked = prevOptions[i].checked
})
Expand Down

0 comments on commit 013d0f9

Please sign in to comment.