Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
added functionality to contact form
  • Loading branch information
ananyag309 authored Jun 9, 2024
1 parent 27abd90 commit 0633444
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ <h4>Call:</h4>
</div>
</div>
<div class="col-lg-8 mt-5 mt-lg-0">
<form action="" role="form" class="php-email-form">
<form id="contactForm" action="" role="form" class="php-email-form">
<div class="row">
<div class="col-md-6 form-group">
<input type="text" name="name" class="form-control" id="name" placeholder="Your Name" required>
Expand All @@ -1101,10 +1101,23 @@ <h4>Call:</h4>
</div>
<div class="text-center"><button type="submit">Send Message</button></div>
</form>
<div id="confirmationMessage" style="display:none; margin-top: 20px; color: green;">
Thank you for your message. We will get back to you shortly.
</div>
</div>
</div>
</div>
</section><!-- End Contact Section -->
</section>

<script>
document.getElementById('contactForm').addEventListener('submit', function(event) {
event.preventDefault(); // Prevent form submission
// Display confirmation message
document.getElementById('confirmationMessage').style.display = 'block';
// Reset the form
event.target.reset();
});
</script>



Expand Down

0 comments on commit 0633444

Please sign in to comment.