Conrad Marsili, a 5 Star Officiant
function disableSubmitwhileReset4437972000000320001() { var submitbutton = document.getElementById('formsubmit4437972000000320001'); if (document.getElementById('privacyTool4437972000000320001') !== null || document.getElementById('consentTool') !== null) { submitbutton.disabled = true; submitbutton.style.opacity = '0.5;'; } else { submitbutton.removeAttribute('disabled'); } } function checkMandatory4437972000000320001() { var mndFields=new Array('Last Name','CONTACTCF81'); var fldLangVal=new Array('Last Name','WEDDING DATE'); var i; var mndFieldslength=mndFields.length; var fieldObj; for (i = 0; i < mndFieldslength; i++) { fieldObj = document.forms.BiginWebToContactForm4437972000000320001[mndFields[i]]; if (fieldObj) { if (fieldObj.value.replace(/^s+|s+$/g, '').length === 0) { if (fieldObj.type === 'file') { alert('Please select a file to upload.'); fieldObj.focus(); return false; } alert(fldLangVal[i] + ' cannot be empty.'); fieldObj.focus(); return false; } else if (fieldObj.nodeName === 'SELECT') { if (fieldObj.options[fieldObj.selectedIndex].value === '-None-') { alert(fldLangVal[i] + ' cannot be none.'); fieldObj.focus(); return false; } } else if (fieldObj.type === 'checkbox') { if (fieldObj.checked === false) { alert('Please accept ' + fldLangVal[i]); fieldObj.focus(); return false; } } if (fieldObj.name === 'Last Name' && fieldObj.value) { name = fieldObj.value; } } } return true; } function validateFileUpload(){var e=document.getElementById("theFile"),t=0;if(e){if(e.files.length>3)return alert("You can upload a maximum of three files at a time."),!1;if("files"in e){var i=e.files.length;if(0!==i){for(var o=0;o20971520)return alert("Total file(s) size should not exceed 20MB."),!1}}}return!0}