diff --git a/public/scripts/manage/division.js b/public/scripts/manage/division.js index fb623c5..a542a65 100644 --- a/public/scripts/manage/division.js +++ b/public/scripts/manage/division.js @@ -48,6 +48,11 @@ async function checkDataValidity() { if(!nameTextbox.value) dataIsValid = false; + const sportHasContent = sportDropdown.options.length; + const genderHasContent = genderDropdown.options.length; + + if(!sportHasContent || !genderHasContent) dataIsValid = false; + if(dataIsValid) submitButton.disabled = false; else submitButton.disabled = true;