Closed davidsneighbour closed 2 years ago
Also, the form fields all are missing name fields.
Final working form looks like this:
<form action="{{site.Params.contact_form_action}}" method="post">
<div class="mb-4">
<label for="name" class="form-label">{{ i18n "name" }}</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="mb-4">
<label for="email" class="form-label">{{ i18n "email" }}</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
<div class="mb-4">
<label for="subject" class="form-label">{{ i18n "subject" }}</label>
<input type="text" class="form-control" id="subject" name="subject" required>
</div>
<div class="mb-4">
<label for="message" class="form-label">{{ i18n "message"}}</label>
<textarea class="form-control" id="message" rows="4" name="message" required></textarea>
</div>
<button type="submit" class="btn btn-primary" aria-label="Send Message">{{ i18n "send_message"}}</button>
</form>
Thanks, I updated the code.
There are several issues on the contact form in layouts/_default/contact.html:
method="post"
to work with formspree