Spaces:
Running
Running
make attendance form A's student name dropdown list like attendance form B's student name dropdown list is which it only appears in the form when i have entered or chosen the form and class
Browse files664 unmodified lines66566666766866967067167267367467567667766866967067167267367467567667767867968067968068168227 unmodified lines710711712714713714715716664 unmodified lines studentSelect.disabled = true; } }
// Show/hide student dropdown based on attendance selection document.querySelectorAll('input[name="attendance"]').forEach(radio => { radio.addEventListener('change', function() { if (this.value === 'yes') { document.getElementById('student-container').classList.remove('hidden'); } else { document.getElementById('student-container').classList.add('hidden'); document.getElementById('student').value = ''; } // Show student dropdown only when attendance is "yes" document.querySelectorAll('input[name="attendance"]').forEach(radio => { radio.addEventListener('change', function() { if (this.value === 'yes') { loadStudents(); // Reload students in case class/form changed } else { document.getElementById('student-container').classList.add('hidden');document.getElementById('student').value = ''; } }); }); }); // Function to reset the form// Function to reset the form function resetForm() { // Clear form fields document.getElementById('class').value = '';27 unmodified lines // Initialize student dropdown based on initial selection if (document.querySelector('input[name="attendance"]:checked').value === 'yes') { document.getElementById('student-container').classList.remove('hidden'); }}</script></body></html>attendance.html+12-13