Hello
On the accordion control, is it possible to add JavaScript so that users would not be able to advance to Tab 2 unless they filled out all fields from Tab 1?
Thanks,
Alberto
Hello
On the accordion control, is it possible to add JavaScript so that users would not be able to advance to Tab 2 unless they filled out all fields from Tab 1?
Thanks,
Alberto
Never mind, I was able to do it using the code below.
if (fd.field('Cough').value == null) {
fd.container('Accordion1').$children[1].disabled = true;
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('Sorethroat').value == null) {
fd.container('Accordion1').$children[1].disabled = true;
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('Sneezingnasalcongestion').value == null) {
fd.container('Accordion1').$children[1].disabled = true;
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('ShortnessBreath').value == null) {
fd.container('Accordion1').$children[1].disabled = true;
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('RunnyNose').value == null) {
fd.container('Accordion1').$children[1].disabled = true;
fd.container('Accordion1').$children[2].disabled = true;
} else {
fd.container('Accordion1').$children[1].disabled = false;
//fd.container('Accordion0').$children[2].disabled = true;
}
}
function SymptomsSectionB() {
if (fd.field('HoarseVoice').value == null) {
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('TasteDisorder').value == null) {
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('Diarrhea').value == null) {
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('Difficultyswallowing').value == null) {
fd.container('Accordion1').$children[2].disabled = true;
} else if (fd.field('Nauseavomiting').value == null) {
fd.container('Accordion1').$children[2].disabled = true;
} else {
fd.container('Accordion1').$children[2].disabled = false;
}
}
fd.field('Cough').$on('change',SymptomsSectionA);
fd.field('Sorethroat').$on('change',SymptomsSectionA);
fd.field('Sneezingnasalcongestion').$on('change',SymptomsSectionA);
fd.field('ShortnessBreath').$on('change',SymptomsSectionA);
fd.field('RunnyNose').$on('change',SymptomsSectionA);
fd.field('HoarseVoice').$on('change',SymptomsSectionB);
fd.field('TasteDisorder').$on('change',SymptomsSectionB);
fd.field('Diarrhea').$on('change',SymptomsSectionB);
fd.field('Difficultyswallowing').$on('change',SymptomsSectionB);
fd.field('Nauseavomiting').$on('change',SymptomsSectionB);
SymptomsSectionA();
SymptomsSectionB();