Time Off Request (HTML)
A leave request where the second date must not precede the first and the working-day count is computed in the browser. The cross-field date rule is the constraint HTML cannot express, which makes it a useful validator fixture.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Time off request - Novus Examples</title>
<meta name="description" content="A date range with a computed working-day count and a cover arrangement. SAMPLE test data only.">
<style>:root{--bg:#f6f7f9;--card:#fff;--fg:#1a1d23;--muted:#5b6472;--border:#d9dee6;--accent:#0f9d6b;--accent-d:#0c7f56;--err:#d33;--radius:10px}*{box-sizing:border-box}body{margin:0;font:16px/1.5 system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--fg);padding:2rem 1rem}.wrap{max-width:640px;margin:0 auto}.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:1.75rem;box-shadow:0 1px 3px rgba(0,0,0,.05)}h1{margin:0 0 .25rem;font-size:1.55rem}.lead{margin:0 0 1.5rem;color:var(--muted)}form{display:grid;gap:1.1rem}.field{display:grid;gap:.35rem}label{font-weight:600;font-size:.92rem}.req{color:var(--err)}.hint{font-size:.8rem;color:var(--muted)}input,select,textarea{font:inherit;color:inherit;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:.6rem .7rem;width:100%}input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}textarea{resize:vertical;min-height:110px}input[type=range]{padding:0}input[type=color]{height:44px;padding:.25rem}input[type=file]{padding:.45rem}.group{display:grid;gap:.45rem}.opt{display:flex;align-items:center;gap:.55rem;font-weight:400}.opt input{width:auto}.inline{display:flex;flex-wrap:wrap;gap:1rem}fieldset{border:1px solid var(--border);border-radius:12px;padding:1rem;margin:0}legend{font-weight:600;padding:0 .4rem}.hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}button{font:inherit;font-weight:700;cursor:pointer;border:0;border-radius:var(--radius);padding:.7rem 1.3rem}.btn{background:var(--accent);color:#fff}.btn:hover{background:var(--accent-d)}.btn-ghost{background:transparent;color:var(--muted);border:1px solid var(--border)}.actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.3rem}.ok{display:none;background:#e7f7ef;border:1px solid #b6e6cf;color:#0c7f56;border-radius:var(--radius);padding:.7rem .9rem;font-size:.9rem}.foot{margin-top:1.25rem;font-size:.78rem;color:var(--muted);text-align:center}@media(max-width:480px){body{padding:1rem .5rem}.card{padding:1.25rem}}.grid2{display:grid;gap:1.1rem;grid-template-columns:1fr}@media(min-width:560px){.grid2{grid-template-columns:1fr 1fr}}.note{font-size:.82rem;color:var(--muted);border-left:3px solid var(--border);padding:.15rem 0 .15rem .7rem;margin:.2rem 0}.steps{display:flex;gap:.4rem;flex-wrap:wrap;list-style:none;padding:0;margin:0 0 1.1rem;font-size:.8rem}.steps li{border:1px solid var(--border);border-radius:999px;padding:.2rem .7rem;color:var(--muted)}.steps li[aria-current=step]{border-color:var(--accent);color:var(--accent-d);font-weight:700}.vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}table.matrix{width:100%;border-collapse:collapse;font-size:.85rem}table.matrix th,table.matrix td{border:1px solid var(--border);padding:.4rem .5rem;text-align:left}table.matrix th{background:#eef1f5;font-weight:600}[data-branch]{display:none}[data-branch].on{display:grid}input:read-only,textarea:read-only{background:#f1f3f6;color:var(--muted)}input:disabled,select:disabled,textarea:disabled{background:#eceff3;color:#9aa3af}</style>
</head>
<body>
<main class="wrap"><div class="card">
<h1>Request time off</h1>
<p class="lead">A date range with a computed working-day count and a cover arrangement. SAMPLE test data only.</p>
<form method="post" action="#" novalidate>
<div class="hp" aria-hidden="true"><label>Leave this field empty<input type="text" name="website" tabindex="-1" autocomplete="off"></label></div>
<fieldset><legend>Dates</legend>
<div class="field"><label for="f-from_date">First day away <span class="req">*</span></label><input id="f-from_date" type="date" name="from_date" min="2026-08-10" value="2026-08-17" required></div>
<div class="field"><label for="f-to_date">Last day away <span class="req">*</span></label><input id="f-to_date" type="date" name="to_date" min="2026-08-10" value="2026-08-21" required></div>
</fieldset>
<div class="field"><label for="f-working_days">Working days</label><input id="f-working_days" type="number" name="working_days" min="0" step="1" value="0" readonly><span class="hint">Counted in the browser, weekends excluded.</span></div>
<fieldset><legend>Type of leave <span class="req">*</span></legend>
<div class="group"><label class="opt" for="opt-leave-type-annual"><input id="opt-leave-type-annual" type="radio" name="leave_type" value="annual" required checked> Annual leave</label><label class="opt" for="opt-leave-type-unpaid"><input id="opt-leave-type-unpaid" type="radio" name="leave_type" value="unpaid" required> Unpaid</label><label class="opt" for="opt-leave-type-study"><input id="opt-leave-type-study" type="radio" name="leave_type" value="study" required> Study</label><label class="opt" for="opt-leave-type-compassionate"><input id="opt-leave-type-compassionate" type="radio" name="leave_type" value="compassionate" required> Compassionate</label></div>
</fieldset>
<fieldset><legend>Cover</legend>
<div class="field"><label for="f-cover_person">Who is covering</label><input id="f-cover_person" type="text" name="cover_person" autocomplete="name"></div>
<div class="field"><label for="f-handover">Handover notes</label><textarea id="f-handover" name="handover" maxlength="500" rows="3"></textarea></div>
</fieldset>
<p class="hint" data-locked="notice">SAMPLE test data only - nothing is submitted, uploaded, or stored.</p>
<div class="ok" role="status">The sample request validated locally - nothing was sent.</div>
<div class="actions"><button type="submit" class="btn">Send the sample request</button></div>
</form>
<script>var from=document.getElementById('f-from_date');var to=document.getElementById('f-to_date');var days=document.getElementById('f-working_days');function count(){to.min=from.value;var a=new Date(from.value);var b=new Date(to.value);if(isNaN(a)||isNaN(b)||b<a){days.value='0';return;}var n=0;for(var d=new Date(a);d<=b;d.setDate(d.getDate()+1)){var w=d.getDay();if(w!==0&&w!==6){n+=1;}}days.value=String(n);}from.addEventListener('change',count);to.addEventListener('change',count);count();</script>
<p class="foot">Free example form from Novus Examples · works offline, no data leaves your browser.</p>
</div></main>
<script>document.querySelectorAll('form').forEach(function(f){f.addEventListener('submit',function(e){e.preventDefault();var hp=f.querySelector('.hp input');if(hp&&hp.value){return;}if(!f.checkValidity()){f.reportValidity();return;}var ok=f.querySelector('.ok');if(ok){ok.style.display='block';ok.scrollIntoView({block:'nearest'});}f.reset();});});</script>
</body>
</html>
Specifications
- Fields
- 6
- Use Case
- employment
- Validation
- HTML5 native
- Honeypot
- true
- Standalone
- true
- Dependencies
- none
- Cross Field Rule
- end date on or after start date
- Computed Days
- true
What is a .html file?
HTML (HyperText Markup Language) is the structural markup language of the web, using nested tags to define document content, semantics, and links. It is typically paired with CSS for presentation and JavaScript for behavior. It is the foundational format rendered by browsers.
How to use this file
Use an example HTML file to test parsers, DOM construction, sanitization of untrusted markup, and rendering or scraping pipelines.
How to use this file for testing
“Time Off Request (HTML)” is a deterministic Novus Examples fixture for Form testing, Form parsing, Autofill testing, HTML parsing. HTML and PDF form files for testing scrapers, autofill, validators, and PDF form fillers across real-life use cases.
Documented properties for this file: 6 fields. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
This form is fictional SAMPLE content for tooling tests (autofill, scrapers, PDF fillers). It is not an official government, bank, or clinic form. Open the HTML offline or fill the PDF in any viewer; the demo submit path never stores data.
Embed this form
It's a single self-contained HTML file (inlined CSS, native validation, no external requests). Download it, host it on your own site, and drop it into any page with an iframe.
<!-- Download time-off-request.html, host it on your site, then embed the form anywhere: -->
<iframe
src="/path/to/time-off-request.html"
title="Time Off Request (HTML)"
width="100%"
height="640"
loading="lazy"
style="border:0">
</iframe>Related files
- htmlConsent Form Template (HTML, SAMPLE)A minimal fictional marketing-consent HTML form — for privacy UX and scraper tests.

- emlEML — multipart/alternative Whose Parts DisagreeText and HTML alternatives that state different totals and different delivery dates. The spec says the parts must be alternative renderings of the same content, so this fixture shows what a tool extracts when they are not — the answer depends entirely on which part it picks.

- epubEPUB 3 - Inline SVG in XHTML (svg property)SVG written straight into an XHTML content document, with properties="svg" declared on the manifest item as EPUB 3 requires. The other half of the SVG question: inline vector markup rather than a standalone content document.

- epubEPUB 3 - MathML with the mathml Property DeclaredAn EPUB 3 with a block MathML equation and the required properties="mathml" on its content document. The baseline for MathML support, paired with a twin that omits the declaration.

- epubEPUB 3 - Scripted Content with the scripted PropertyAn EPUB 3 whose one content document declares properties="scripted" and contains a single inline script that rewrites one paragraph. It makes no network request and reads correctly with scripting switched off, so it tests the property and the fallback rather than the script.

- epubEPUB 3 - SVG Content Document in the SpineAn EPUB 3 whose first spine item is an SVG content document rather than XHTML, followed by a chapter that explains what should have appeared. For testing readers that assume every reading-order document is XHTML.

Generated by generation/forms_p7.py. Free for any use, no attribution required — license.