Language

Input Type Hidden


Input type="hidden" does not display the input element. So that the user cannot examine or manipulate the value of the input element.

Common data like: user_id,user_name etc is kept in the value attribute in this hidden input. However, no security-sensitive data is kept in hidden input.

Using type="hidden" in input element does not cause constraint validation.

How input type hidden is used has been explained

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form>
        <label for="fullName">Full Name</label>
        <input type="text"  id="fullName"><br>
        <label>Hidden Input Element</label><br><br>
        <input type="hidden" value="user_id_25">
        <input type="submit" value="Submit">
    </form>
</body>
</html>