Skip to content

Commit 66ad4c1

Browse files
committed
Remove console logs from contact form to fix submission issues
1 parent adec002 commit 66ad4c1

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

src/js/simple-contact-form.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@ document.addEventListener('DOMContentLoaded', function() {
44
const successMessage = document.getElementById('form-success');
55

66
if (!form) {
7-
console.error('Contact form not found');
87
return;
98
}
109

11-
console.log('Contact form initialized');
12-
1310
form.addEventListener('submit', async function(e) {
1411
e.preventDefault();
15-
console.log('Form submitted');
1612

1713
// Get form data
1814
const formData = new FormData(form);
@@ -45,8 +41,6 @@ document.addEventListener('DOMContentLoaded', function() {
4541
}
4642

4743
try {
48-
console.log('Sending to Formspree...');
49-
5044
const response = await fetch(form.action, {
5145
method: 'POST',
5246
body: formData,
@@ -55,8 +49,6 @@ document.addEventListener('DOMContentLoaded', function() {
5549
}
5650
});
5751

58-
console.log('Response:', response.status, response.ok);
59-
6052
if (response.ok) {
6153
// Hide form and show success
6254
form.style.display = 'none';
@@ -73,7 +65,6 @@ document.addEventListener('DOMContentLoaded', function() {
7365
}
7466

7567
} catch (error) {
76-
console.error('Error:', error);
7768
alert('Sorry, there was an error sending your message. Please try again.');
7869
} finally {
7970
// Re-enable button

0 commit comments

Comments
 (0)