CodeLab
Tutorials For Everyone
Run
<!DOCTYPE html> <html> <head> <title>HTML Form Hidden Control Example</title> </head> <body> <h3>HTML Form Hidden Control Example</h3> Please submit your name. when you submit the form, you will see the hidden input field data will be submitted also. <form action='/form-submit/'> <label for="first-name">First name:</label> <input type="text" id="first-name" name="first-name" /><br> <input type="hidden" id="current-year" name="current-year" value="2022" /> <input type="submit" value="Submit" /> </form> <p><strong>Note:</strong> The hidden field is not shown to the user, but the data is sent when the form is submitted.</p> </body> </html>