Changed around line 1
+ document.getElementById('applyForm').addEventListener('submit', function(event) {
+ event.preventDefault();
+
+ const fullName = document.getElementById('fullName').value;
+ const email = document.getElementById('email').value;
+ const phone = document.getElementById('phone').value;
+ const idProof = document.getElementById('idProof').files[0];
+ const codeOfConduct = document.getElementById('codeOfConduct').checked;
+
+ if (!fullName || !email || !phone || !idProof || !codeOfConduct) {
+ alert('Please fill out all fields and agree to the Code of Conduct.');
+ return;
+ }
+
+ const formData = new FormData();
+ formData.append('fullName', fullName);
+ formData.append('email', email);
+ formData.append('phone', phone);
+ formData.append('idProof', idProof);
+
+ // Simulate form submission
+ setTimeout(() => {
+ alert('Application submitted successfully! We will review your application and get back to you shortly.');
+ document.getElementById('applyForm').reset();
+ }, 1000);
+ });