File upload form template
A contact form that accepts an attachment. For sending in documents, photos or artwork. File uploads need a paid plan; a submission can carry up to 5 files and 4 MB.
Preview
html
<form action="https://formtango.com/f/YOUR_FORM_ID" method="POST" enctype="multipart/form-data">
<p>
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
</p>
<p>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
</p>
<p>
<label for="attachment">Your file</label>
<input type="file" id="attachment" name="attachment" required>
</p>
<p>
<label for="message">Message</label>
<textarea id="message" name="message" rows="5"></textarea>
</p>
<!-- Spam trap: leave this hidden and empty -->
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>File upload form with Tailwind CSS
The same form styled with Tailwind utility classes. Change indigo to your own colour.
html + tailwind
<form action="https://formtango.com/f/YOUR_FORM_ID" method="POST" enctype="multipart/form-data" class="mx-auto max-w-lg space-y-5">
<div>
<label for="name" class="block text-sm font-medium text-gray-700">Name</label>
<input type="text" id="name" name="name" class="mt-1 block w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-900 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500" required>
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
<input type="email" id="email" name="email" class="mt-1 block w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-900 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500" required>
</div>
<div>
<label for="attachment" class="block text-sm font-medium text-gray-700">Your file</label>
<input type="file" id="attachment" name="attachment" class="mt-1 block w-full text-sm text-gray-700 file:mr-4 file:rounded-lg file:border-0 file:bg-indigo-50 file:px-4 file:py-2 file:font-medium file:text-indigo-700" required>
</div>
<div>
<label for="message" class="block text-sm font-medium text-gray-700">Message</label>
<textarea id="message" name="message" rows="5" class="mt-1 block w-full rounded-lg border border-gray-300 px-3 py-2 text-gray-900 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500"></textarea>
</div>
<!-- Spam trap: leave this hidden and empty -->
<input type="text" name="_gotcha" class="hidden" tabindex="-1" autocomplete="off">
<button type="submit" class="w-full rounded-lg bg-indigo-600 px-4 py-2.5 font-semibold text-white hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">Send</button>
</form>How to use it
- Create a free FormTango account and add a form to get your endpoint.
- Copy the HTML and replace YOUR_FORM_ID with your form's id.
- Paste it into your page. Submissions arrive in your inbox and by email.
The hidden _gotcha field is a spam trap: people never see it, and bots that fill it in are discarded. Leave it as it is.