d attribute
                specificLeaveField.setAttribute('required', 'required');
            }
        });

        // Initial toggle based on the current checkbox state
        toggleFields();

        // Add event listener for checkbox change
        includeAllCheckbox.addEventListener('change', toggleFields);

    });
</script>
