What is enctype?

The enctype attribute of an HTML form sets how the browser encodes the form data in the body of a POST request.

It has three possible values. The default, application/x-www-form-urlencoded, sends the fields as one line of name=value pairs. multipart/form-data sends each field as its own part and is the only one that can carry files. text/plain sends loosely formatted text and is meant for debugging only.

The attribute is used only when the method is POST. The case that matters is file uploads: a form with a file input and no enctype sends just the file's name, so the upload seems to work and the file never arrives.

For a normal contact form you can leave enctype out. Add enctype="multipart/form-data" when the form has a file input. FormTango accepts both, and JSON sent from JavaScript.

html
<form action="https://formtango.com/f/YOUR_FORM_ID" method="POST" enctype="multipart/form-data">
  <input type="file" name="attachment">
  <button type="submit">Upload</button>
</form>

Related