Tidy form markup

This commit is contained in:
Oliver Davies 2018-10-06 08:41:31 +01:00
parent fff613079e
commit 1ff244c6ca

View file

@ -4,44 +4,36 @@ layout: default
use: [posts] use: [posts]
--- ---
{% block content %} {% block content %}
<p>To send me an email, complete the form below.</p> <div>
<p>To send me an email, complete the form below.</p>
</div>
<form name="contact" method="POST" action="/contact/thanks" data-netlify="true" netlify-honeypot="bot-field"> <form name="contact" method="POST" action="/contact/thanks" data-netlify="true" netlify-honeypot="bot-field">
<label for="name" class="block mb-1">Name</label> <div>
<input type="text" <label for="name" class="block mb-1">Name</label>
class="w-full p-2 mb-4 border border--grey" <input type="text" class="w-full p-2 mb-4 border border--grey" id="name" required />
name="name" </div>
required>
<label for="email" class="block mb-1">Email</label> <div>
<input type="email" <label for="email" class="block mb-1">Email</label>
class="w-full p-2 mb-4 border border--grey" <input type="email" class="w-full p-2 mb-4 border border--grey" id="email" required />
name="email" </div>
required>
<label for="subject" class="block mb-1">Subject</label> <div>
<input type="text" <label for="subject" class="block mb-1">Subject</label>
class="w-full p-2 mb-4 border border--grey" <input type="text" class="w-full p-2 mb-4 border border--grey" id="subject" required />
name="subject" </div>
required>
<label for="message" class="block mb-1">Message</label> <div>
<textarea name="message" <label for="message" class="block mb-1">Message</label>
class="w-full p-2 mb-4 border border--grey" <textarea id="message" class="w-full p-2 mb-4 border border--grey" rows="5" required></textarea>
rows="5" </div>
required>
</textarea>
<button class="button" type="submit"> <div>
Send email <button class="button" type="submit">Send email</button>
</button> </div>
<input type="hidden" <input type="hidden" name="_next" value="{{ site.url }}/contact/thanks" />
name="_next" <input type="text" id="bot-field" class="hidden" />
value="{{ site.url }}/contact/thanks" />
<input type="text" name="bot-field" class="hidden" />
</form> </form>
{% endblock %} {% endblock %}
{% block body_classes 'page--contact' %}