On my webpage, users need to upload a list of people and agree to terms and conditions before they can click on the pay button. How can I disable the button until they have uploaded the file and checked the terms and conditions checkbox?
// Function to convert uploaded file to JSON
$(document).ready(function(){
$("#employeelist").change(function(evt){
window.selectedFile = evt.target.files[0];
convertToExcel(); return false;
});
});
<!-- File Upload -->
<input type="file" id="employeelist" name="employeelist" autofocus autocomplete="off" accept=".csv, .xls, .xlsx" />
<!-- Terms and Conditions Checkbox -->
<input type="checkbox" name="termsNcon" value="termsNcon" id="termsNcon" /> I have read and agree to the Terms and Conditions and Privacy Policy
<!-- Pay Button -->
<button id="stripe-button" disabled> > Continue to Pay </button>
I want to only enable the >Continue to Pay button once a file has been uploaded and the Terms and Conditions checkbox is checked.