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 lines66566666766866967067167267367467567667767867968068168268327 unmodified lines711712713714715716717664 unmodified linesstudentSelect.disabled = true;}}// Show/hide student dropdown based on attendance selectiondocument.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 = '';}});});// Function to reset the formfunction resetForm() {// Clear form fieldsdocument.getElementById('class').value = '';27 unmodified lines// Initialize student dropdown based on initial selectionif (document.querySelector('input[name="attendance"]:checked').value === 'yes') {document.getElementById('student-container').classList.remove('hidden');}</script></body></html>664 unmodified lines66566666766866967067167267367467567667767867968068168227 unmodified lines710711712713714715716664 unmodified linesstudentSelect.disabled = true;}}// 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 formfunction resetForm() {// Clear form fieldsdocument.getElementById('class').value = '';27 unmodified lines// Initialize student dropdown based on initial selectionif (document.querySelector('input[name="attendance"]:checked').value === 'yes') {document.getElementById('student-container').classList.remove('hidden');}</script></body></html>
attendance.html+12-13