Skip to content

Commit

Permalink
Created wo9rking feedback form
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayushmaanagarwal1211 committed Jun 26, 2024
1 parent 270ce7a commit 8f5f944
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions new-website/feedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="row align-items-center">
<div class="col-lg-7 mb-5 mb-lg-0">
<h2 class="mb-5">Fill this feedback form</h2><h3>Reach out to us.</h3>
<form action="" class="border-right pr-5 mb-5" method="post" id="contactForm" name="contactForm">
<form action="" class="border-right pr-5 mb-5" method="post" id="feedback-form" name="contactForm">
<!--Star rating-->
<div class="star-rating">
<ul>
Expand All @@ -58,7 +58,7 @@ <h2 class="mb-5">Fill this feedback form</h2><h3>Reach out to us.</h3>
</div>
<div class="row">
<div class="col-md-12 form-group">
<input type="text" class="form-control" name="email" id="email" placeholder="[email protected]">
<input type="text" class="form-control" name="from_email" id="email" placeholder="[email protected]">
</div>
</div>
<div class="row">
Expand All @@ -68,14 +68,13 @@ <h2 class="mb-5">Fill this feedback form</h2><h3>Reach out to us.</h3>
</div>
<div class="row">
<div class="col-md-12">
<input type="submit" value="Send Message" class="btn btn-primary rounded-0 px-2">
<input value="Send Message" onclick="handleSubmit()" class="btn btn-primary rounded-0 px-2">
<span class="submitting"></span>
</div>
</div>
<p>Created by <a href="index.html" target="_blank">ResourceHub</a></p>
</form>
<div id="form-message-warning mt-4"></div>
<div id="form-message-success" style="display: none;">
<div id="thank-you-message">
Your message was sent, thank you!
</div>
</div>
Expand Down Expand Up @@ -144,6 +143,41 @@ <h3 class="mb-4">We value your feedback</h3>


</script>

<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/@emailjs/browser@4/dist/email.min.js">
</script>
<script type="text/javascript">
(function(){
emailjs.init({
publicKey: "rId2aw03Pj2ZNq2U5",
});
})();
</script>
<script>
// Feedback JS
function handleSubmit() {

emailjs.sendForm('service_hrz8hfg', 'template_mu8go9x',"#feedback-form").then(
(response) => {
console.log('SUCCESS!', response.status, response.text);
},
(error) => {
console.log('FAILED...', error);
},
);


document.getElementById('thank-you-message').style.display='block'
setTimeout(() => {
document.getElementById('thank-you-message').style.display='none '

}, 2000);



}
</script><script>
document.getElementById('thank-you-message').style.display='none '
</script>
</body>
</html>

0 comments on commit 8f5f944

Please sign in to comment.