The formenctype Attribute

The formenctype Attribute

//send form-data that is default encoded (the first submit button), 
//and encoded as "multipart/form-data" (the second submit button):

<form action="/action_page_binary.asp" method="post">
  First name: <input type="text" name="fname"><br>
  <input type="submit" value="Submit">
  <input type="submit" formenctype="multipart/form-data"
  value="Submit as Multipart/form-data">
  • Specifies how the form data should be encoded when submitted (only for forms with method="post").
  • Overrides the enctype attribute of the <form> element.
  • Is used with type="submit" and type="image".

Related concepts

The formenctype Attribute — Structure map

Clickable & Draggable!

The formenctype Attribute — Related pages: