Added send-email feature

This commit is contained in:
2023-09-11 21:58:24 +04:00
parent 6d45d1c604
commit a1b3d23c37
10 changed files with 161 additions and 38 deletions

View File

@@ -56,18 +56,18 @@
<div class="col-md-10 col-lg-8 mx-auto">
<h1>Contact me</h1>
<p>Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!</p>
<form id="contactForm" name="sentMessage">
<form action="/send-email" method="POST" id="contactForm" name="sentMessage">
<div class="control-group">
<div class="form-floating controls mb-3"><input class="form-control" type="text" id="name" required="" placeholder="Name"><label class="form-label" for="name">Name</label><small class="form-text text-danger help-block"></small></div>
<div class="form-floating controls mb-3"><input name="name" class="form-control" type="text" id="name" required maxlength="50" placeholder="Name"><label class="form-label" for="name">Name</label><small class="form-text text-danger help-block"></small></div>
</div>
<div class="control-group">
<div class="form-floating controls mb-3"><input class="form-control" type="email" id="email" required="" placeholder="Email Address"><label class="form-label">Email Address</label><small class="form-text text-danger help-block"></small></div>
<div class="form-floating controls mb-3"><input class="form-control" name="email" type="email" id="email" required placeholder="Email Address"><label class="form-label">Email Address</label><small class="form-text text-danger help-block"></small></div>
</div>
<div class="control-group">
<div class="form-floating controls mb-3"><input class="form-control" type="tel" id="phone" required="" placeholder="Phone Number"><label class="form-label">Phone Number</label><small class="form-text text-danger help-block"></small></div>
<div class="form-floating controls mb-3"><input class="form-control" name="phone" type="tel" id="phone" maxlength="20" placeholder="Phone Number"><label class="form-label">Phone Number</label><small class="form-text text-danger help-block"></small></div>
</div>
<div class="control-group">
<div class="form-floating controls mb-3"><textarea class="form-control" id="message" data-validation-required-message="Please enter a message." required="" placeholder="Message" style="height: 150px;"></textarea><label class="form-label">Message</label><small class="form-text text-danger help-block"></small></div>
<div class="form-floating controls mb-3"><textarea class="form-control" name="message" id="message" maxlength="1000" data-validation-required-message="Please enter a message." required="" placeholder="Message" style="height: 150px;"></textarea><label class="form-label">Message</label><small class="form-text text-danger help-block"></small></div>
</div>
<div id="success"></div>
<div class="mb-3"><button class="btn btn-primary" id="sendMessageButton" type="submit">Send</button></div>