diff options
-rw-r--r-- | src/docs-google-com-fix-forms/google_forms.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/docs-google-com-fix-forms/google_forms.js b/src/docs-google-com-fix-forms/google_forms.js index 2abf3fa..22e783c 100644 --- a/src/docs-google-com-fix-forms/google_forms.js +++ b/src/docs-google-com-fix-forms/google_forms.js @@ -45,6 +45,14 @@ for (let div of form.querySelectorAll('div[data-params]')) { new_radio.value = input_div.getAttribute("data-value"); input_div.replaceWith(new_radio); } + /* handle checkboxes */ + for (const input_div of div.querySelectorAll('[data-answer-value]')) { + const new_checkbox = document.createElement('input'); + new_checkbox.type = 'checkbox'; + new_checkbox.name = name; + new_checkbox.value = input_div.getAttribute("data-answer-value"); + input_div.replaceWith(new_checkbox); + } } else { input.removeAttribute('disabled'); input.name = name; |