Hidden and read-only fields in HTML
Values you submit without editing, and fields shown but locked.
<form action="/api/results" method="post">
<input type="hidden" name="snippet_id" value="1842">
<input type="hidden" name="mode" value="tour">
<label for="lang">Language</label>
<input type="text" id="lang" name="lang" value="python" readonly>
<label for="plan">Plan</label>
<input type="text" id="plan" value="free" disabled>
<button type="submit">Submit run</button>
</form>
How it works
- A hidden input posts state the user never sees.
readonlysubmits its value;disableddoes not.- Neither is a security control — validate on the server.
The run, in numbers
- Lines
- 12
- Characters to type
- 379
- Tokens
- 99
- Three-star pace
- 75 tpm
At the three-star pace of 75 tokens a minute, this run takes about 79 seconds.
Step 5 of 5 in Validation & submission, step 23 of 25 in Forms & inputs.