fd.rendered(function() { //$(fd.control('btnExportPDF').$el).hide(); fd.messages.PlumsailForm_CorrectErrors = 'Please complete all Sections before proceeding to NEXT page. Tap anywhere in the box to close this alert and continue self-screening.'; $(fd.field('FinalComments').$parent.$el).hide(); //Limiting Phone field to 9 characters text = fd.field('PhoneNumber').value; function limitCharacters(fieldName){ var newText = fd.field(fieldName).value; if(fd.field(fieldName).value.length > 10) { fd.field(fieldName).value = text; } else { text = newText; } } fd.field('PhoneNumber').$on('change', function(value) { limitCharacters('PhoneNumber'); }); fd.clear() fd.container("Wizard1").widget.$on("update:startIndex", function() { $('.wizard-progress-bar')[0].scrollIntoView({ behavior: 'smooth' }); }); fd.container('Accordion1').$children[0].open = true; fd.container('Accordion1').$children[1].open = false; fd.container('Accordion1').$children[2].open = false; //Ensures that all fields in symptops section A are filled out function SymptomsSectionA() { 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(); function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i