Commit 34b062f7 by Owen Ryan Ang

WG-390 Resolution

parent 4e62f742
...@@ -478,7 +478,8 @@ const inputChecklist = (key, validation) => { ...@@ -478,7 +478,8 @@ const inputChecklist = (key, validation) => {
var checkbox = document.createElement('input'); var checkbox = document.createElement('input');
checkbox.type = 'checkbox'; checkbox.type = 'checkbox';
checkbox.name = 'checkboxChoices'; checkbox.name = `checkboxChoices_${key}`;
checkbox.classList.add("checkboxOption");
checkbox.value = item; checkbox.value = item;
if (index == 0) checkbox.setAttribute('id', `${key}`); if (index == 0) checkbox.setAttribute('id', `${key}`);
...@@ -495,7 +496,8 @@ const inputChecklist = (key, validation) => { ...@@ -495,7 +496,8 @@ const inputChecklist = (key, validation) => {
dependentDiv.classList.add('checkbox'); dependentDiv.classList.add('checkbox');
var dependentCheckbox = document.createElement('input'); var dependentCheckbox = document.createElement('input');
dependentCheckbox.type = 'checkbox'; dependentCheckbox.type = 'checkbox';
dependentCheckbox.name = 'checkboxChoices'; dependentCheckbox.name = `checkboxChoices_${key}`;
dependentCheckbox.classList.add("checkboxOption");
dependentCheckbox.id = 'checkDP'; dependentCheckbox.id = 'checkDP';
dependentCheckbox.value = ''; // Set the value here based on the input text dependentCheckbox.value = ''; // Set the value here based on the input text
dependentDiv.appendChild(dependentCheckbox); dependentDiv.appendChild(dependentCheckbox);
...@@ -565,7 +567,8 @@ const inputRadiolist = (key, validation) => { ...@@ -565,7 +567,8 @@ const inputRadiolist = (key, validation) => {
var radio = document.createElement('input'); var radio = document.createElement('input');
radio.type = 'radio'; radio.type = 'radio';
radio.name = 'radioChoices'; radio.name = `radioChoices_${key}`;
radio.classList.add("radioOption");
radio.value = item; radio.value = item;
if (index == 0) radio.setAttribute('id', `${key}`); if (index == 0) radio.setAttribute('id', `${key}`);
...@@ -581,7 +584,8 @@ const inputRadiolist = (key, validation) => { ...@@ -581,7 +584,8 @@ const inputRadiolist = (key, validation) => {
dependentDiv.classList.add('radio-like-checkbox'); dependentDiv.classList.add('radio-like-checkbox');
var dependentRadio = document.createElement('input'); var dependentRadio = document.createElement('input');
dependentRadio.type = 'radio'; dependentRadio.type = 'radio';
dependentRadio.name = 'radioChoices'; dependentRadio.name = `radioChoices_${key}`;
dependentRadio.classList.add("radioOption");
dependentRadio.value = ''; dependentRadio.value = '';
dependentDiv.appendChild(dependentRadio); dependentDiv.appendChild(dependentRadio);
......
...@@ -30,8 +30,8 @@ export const submitForm = async (e) => { ...@@ -30,8 +30,8 @@ export const submitForm = async (e) => {
if (type === 'submit') continue if (type === 'submit') continue
if (type === 'file') continue if (type === 'file') continue
if (type === 'hidden') continue if (type === 'hidden') continue
if (id === 'Radio_List' || name == 'radioChoices') continue if (id === 'Radio_List' || element.classList.contains('radioOption')) continue
if (id === 'Checkbox_List' || name == 'checkboxChoices') continue if (id === 'Checkbox_List' || element.classList.contains("checkboxOption")) continue
if (id === 'DocType') { if (id === 'DocType') {
doctype = element.options[element.selectedIndex].text; doctype = element.options[element.selectedIndex].text;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment