16 lines
652 B
JavaScript
16 lines
652 B
JavaScript
// In the future, we can add interactivity here, for example, form validation or dynamic table updates.
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
// Example: Client-side validation for the add client form
|
|
const addClientForm = document.getElementById('addClientForm');
|
|
if (addClientForm) {
|
|
addClientForm.addEventListener('submit', function (event) {
|
|
const nameInput = document.getElementById('name');
|
|
if (nameInput.value.trim() === '') {
|
|
alert('Client name is required.');
|
|
event.preventDefault(); // Stop form submission
|
|
}
|
|
});
|
|
}
|
|
});
|