document.getElementById('add-expense-form').addEventListener('submit', function(e) { e.preventDefault(); alert('Gasto añadido (simulación)!'); // Here you would normally send the data to the server // For now, we just reset the form this.reset(); });