체크박스 관련 수정

main
이범준 1 year ago
parent d0a1672331
commit 7789daf1cc

@ -80,9 +80,17 @@ class FimsFormFields extends FormFields {
document.querySelectorAll(this.children).forEach(input => { document.querySelectorAll(this.children).forEach(input => {
let property = input.name || input.id; let property = input.name || input.id;
let value = input.value; let value = input.value;
if ("radio" == input.type) { if("radio" == input.type) {
if (input.checked) if(input.checked)
obj[property] = value;
} else if("checkbox" == input.type) {
if(input.checked){
if(obj[property]){
obj[property] += ","+value;
} else {
obj[property] = value; obj[property] = value;
}
}
} else { } else {
if(input.dataset.fmtType){ if(input.dataset.fmtType){
const fmtType = input.dataset.fmtType; const fmtType = input.dataset.fmtType;

Loading…
Cancel
Save