The second button has a
This overrides the enctype of the form.
<form action="/tutorial/action.html" enctype="multipart/form-data"> <input type="text" name="subject" placeholder="Enter subject"> <button type="submit">Submit as encoded text</button> <button type="submit" formenctype="text/plain">Submit as plain text</button> </form>
formenctype attribute overrides the form's enctype attribute.
This attribute specifies how the form data will be encoded before sending it to the server.
formenctype attribute only works for submit type buttons.
<button type="submit" formenctype="application/x-www-form-urlencoded | multipart/form-data | text/plain">
|application/x-www-form-urlencoded||All form data characters will be encoded before sending to the server. This is default.|
|multipart/form-data||Form data characters are encoded before sending to the server. This value is used for forms that has upload function.|
|text/plain||Spaces are converted to "+" symbols but no characters will be encoded.|
Here is when
formenctype support started for each browser: