fix: display thank you message to user if form submission is successful

This commit is contained in:
Ryan Mwangi 2024-11-18 19:22:38 +03:00
parent c7d8799da1
commit ab09b64ed5
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ document.getElementById('applicationForm').addEventListener('submit', function(e
}) })
.then(result => { .then(result => {
console.log('Success:', result); console.log('Success:', result);
responseMessage.textContent = 'Thank you for your application!'; const formContainer = document.getElementById('applicationForm');
responseMessage.className = 'success'; formContainer.innerHTML = '<h2>Thank you for your application!</h2>';
}) })
.catch(error => { .catch(error => {
console.error('Error:', error); console.error('Error:', error);