The <input type="file">
creates a field for selecting files and includes a “Browse” button for file uploads.
Example
<form> <label for=”myfile”>Select a file:</label> <input type=”file” id=”myfile” name=”myfile”> </form> |
The <input type="hidden">
establishes an invisible input field, concealed from users.
Hidden fields enable web developers to include data that remains unseen and unalterable by users during form submission.
Such fields commonly store information regarding the database record that requires updating upon form submission.
Important: Although the value remains hidden from users within the page’s content, it is accessible (and editable) through any browser’s developer tools or the “View Source” feature. Avoid using hidden inputs as a security measure.
Example
<form> <label for=”fname”>First name:</label> <input type=”text” id=”fname” name=”fname”><br><br> <input type=”hidden” id=”custId” name=”custId” value=”3487″> <input type=”submit” value=”Submit”> </form> |
The <input type=”month”> enables users to choose both a month and a year. Depending on browser compatibility, a date picker may appear within the input field.
Example
<form> <label for=”quantity”>Quantity (between 1 and 5):</label> <input type=”number” id=”quantity” name=”quantity” min=”1″ max=”5″> </form> |