Loading Please Wait...
HTML From attributes allow us to defined additional properties to HTML <form> such as where to send the form data (server path), data encryption, data type, etc.
The action attribute defines the action taken when the form is submitted usually by clicking submit button.
In most of the cases, the form data is sent to the server for further processing
If the action attribute is not defined then the form data is sent to the current page when submitting the form.
<form action="server.php">
<label for="email">Email</label><br>
<input type="email" id="email"><br>
<input type="submit" value="Submit">
</form>
The target attribute defines the location to show the data received from the server after the form is submitted.
It may have the following values:
_blank - In new window
_self - In current window (Default)
_parent - In parent frame window
_top - In full body window
framename - In named frame
<form action="server.php" target="_top">
The method attribute defines the method type when submitted the data.
It may have either get (default) or post
method="get"
method="post"
<form action="server.php" method="post">
The autocomplete attribute defines the auto completion of the form data when entering some value like email.
It will show suggestion such as name, email, we have filled before.
It may have on (default) or off values. Sensitive input fields like password must have autocomplete off value.
<form action="server.php" autocomplete="off">
The novalidate attribute defines that the form data should not be validated like email.
<form action="server.php" novalidate>
The enctype attribute defines the data encoding method when submitting form.
This must be used only when method="post"
It may have the following values:
application/x-www-form-urlencoded - Data is encoded and special characters are converted to ASCII hex values (Default).
multipart/form-data - Use this if the form contains file like image upload. Data encoding done as well.
text/plain - No data encoding, try not to use.
<form action="server.php" enctype="multipart/form-data">
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved