{
  "id": "F02",
  "title": "Long form",
  "topic": "forms",
  "use": "Once a form needs about two screen heights, we use the long form. It carries a navigation aid on the left (a scrollspy, vertical tabs or similar) and a field search: you type a search term and jump through the matches in the form.",
  "decisions": [
    "A form of about two screen heights or more gets a section rail on the left that follows the section the user is in and jumps to any section: a form this long cannot be seen at once.",
    "The rail and the toolbar stay in view while the form scrolls, and a heading the rail jumps to lands below the toolbar.",
    "The field search belongs to the long form only: it pays only where there are many fields to find, and above a short form it would be wrong.",
    "The field search is the find in the page (SU02): it marks every match in the labels, jumps to the first at once and keeps the focus in the search field, Enter steps to the next match and Shift+Enter to the previous, and Tab goes into the field of the current match; it shows 'Match n of m' and disables Previous and Next at the ends, where their tooltips say why: 'No earlier match', 'No later match'.",
    "Completing the record lists the missing required entries in one box at the top of the form, each with its section; picking one moves to the field and focuses it. There is one such list, not a second bar below the form.",
    "Save draft is shown, not promised: whether a draft may keep data that is not yet checked is a legal question still open."
  ],
  "try": [
    {
      "do": "Pick Tax in the section rail",
      "then": "the page scrolls until the Tax heading sits just below the toolbar, and the rail marks Tax"
    },
    {
      "do": "Scroll the page",
      "then": "the toolbar with the field search and the rail stay where they are, the form scrolls past them, and the rail follows the section you are in"
    },
    {
      "do": "Type “tax” into Find a field",
      "then": "the page moves to Tax identification no. under Tax at once; every label with “tax” shows the find marked, the label of the current one is filled as a whole, the count reads “Match 1 of 6”, and the focus stays in the search field"
    },
    {
      "do": "Press Enter",
      "then": "the next match comes into view and its label is filled; at the sixth, Enter stays where it is, and Next match is disabled and says No later match when pointed at"
    },
    {
      "do": "Press Previous match",
      "then": "the search goes back one match the same way, and at the first Previous match is disabled and says No earlier match"
    },
    {
      "do": "Step on with Enter, then press Shift+Enter",
      "then": "the search goes back one match, and the focus stays in the search field"
    },
    {
      "do": "Press Tab",
      "then": "the cursor is in the field of the current match, and the marks and the count stay"
    },
    {
      "do": "Clear the search field",
      "then": "the marks, the count and the arrows go away"
    },
    {
      "do": "Press Complete master record without filling in everything",
      "then": "the missing required entries appear as a list at the top of the form, each with its section, and the focus goes into the first of them"
    },
    {
      "do": "Pick an entry in that list",
      "then": "the page moves to the field the same way the field search does, and the focus goes into it"
    }
  ],
  "revision": 3,
  "changes": [
    {
      "revision": 3,
      "change": "The amount fields are text fields with inputmode decimal instead of the number type: they take no step and no spin buttons, and the product validates the amount and formats it for the locale."
    },
    {
      "revision": 2,
      "change": "Shift+Enter in the field search steps to the previous match, Tab goes into the field of the current match, and a jump to a field no longer scrolls a page that holds the form in a frame."
    }
  ],
  "reviewed": true,
  "source": "<style>\n  .f02-toolbar {\n    position: sticky;\n    inset-block-start: 0;\n    z-index: 4;\n    background: var(--ed-color-surface-default);\n  }\n\n  /* The rail sticks below the toolbar, inside its column, which the flank stretches to the height of\n     the form. Once the flank wraps, the column is only as tall as the rail, so it scrolls away instead\n     of covering the form. */\n  .f02-rail {\n    position: sticky;\n    inset-block-start: var(--ed-space-16);\n  }\n\n  /* The sticky toolbar covers the top of the page; a heading the rail scrolls to lands below it. */\n  .f02-form h2 {\n    scroll-margin-block-start: var(--ed-space-16);\n  }\n\n  /* Every find on the warning fill, the label the search stands on on the light one as a whole: the\n     focus stays in the search field, so no focus ring can say where the search is. The shadow widens\n     that fill without moving the label's text. */\n  .f02-form mark {\n    background-color: var(--ed-color-warning-fill-normal);\n    color: var(--ed-color-warning-on-normal);\n  }\n\n  .f02-current {\n    border-radius: var(--ed-border-radius-1x);\n    background-color: var(--ed-color-warning-fill-light);\n    box-shadow: 0 0 0 0.2em var(--ed-color-warning-fill-light);\n  }\n\n  /* Forced colors replace both fills with the canvas; the system's own mark colors and an outline\n     keep the finds and the current label apart. */\n  @media (forced-colors: active) {\n    .f02-form mark {\n      forced-color-adjust: none;\n      background-color: Mark;\n      color: MarkText;\n    }\n\n    .f02-current {\n      outline: 2px solid Highlight;\n    }\n  }\n</style>\n\n<div class=\"ed-stack ed-gap-2\">\n  <div class=\"ed-stack ed-gap-2 ed-pb-4\">\n    <p><a href=\"#\">Back to the employee list</a></p>\n    <div class=\"ed-cluster ed-gap-3 ed-align-items-baseline\">\n      <hgroup class=\"ed-stack ed-gap-0\">\n        <h1>Hans-Jürgen Odenthal</h1>\n        <p class=\"ed-caption-m\">Personnel number 00147 · Bergmann &amp; Söhne Fahrzeugtechnik GmbH &amp; Co. KG</p>\n      </hgroup>\n      <ed-badge variant=\"warning\">Not yet completed</ed-badge>\n    </div>\n  </div>\n\n  <div class=\"f02-toolbar ed-py-2\">\n    <ed-toolbar label=\"Master data of Hans-Jürgen Odenthal\">\n      <search slot=\"search\" class=\"ed-cluster ed-gap-2\">\n        <ed-input id=\"f02-search\" type=\"search\" with-clear placeholder=\"Find a field\" aria-label=\"Find a field\">\n          <ed-icon slot=\"start\" name=\"search\"></ed-icon>\n        </ed-input>\n        <div id=\"f02-hits\" class=\"ed-cluster ed-gap-2\" hidden>\n          <ed-button id=\"f02-previous\" appearance=\"plain\" aria-label=\"Previous match\" disabled>\n            <ed-icon name=\"previous\"></ed-icon>\n          </ed-button>\n          <ed-button id=\"f02-next\" appearance=\"plain\" aria-label=\"Next match\" disabled>\n            <ed-icon name=\"next\"></ed-icon>\n          </ed-button>\n        </div>\n        <span id=\"f02-count\" role=\"status\"></span>\n        <ed-tooltip for=\"f02-previous\">Previous match</ed-tooltip>\n        <ed-tooltip for=\"f02-next\">Next match</ed-tooltip>\n      </search>\n      <ed-button id=\"f02-save-draft\"><ed-icon slot=\"start\" name=\"check_circle\"></ed-icon>Save draft</ed-button>\n      <ed-button id=\"f02-complete\" appearance=\"plain\"><ed-icon slot=\"start\" name=\"check\"></ed-icon>Complete master record</ed-button>\n    </ed-toolbar>\n  </div>\n\n  <p class=\"ed-cluster ed-gap-2 ed-caption-s\">\n    <ed-icon name=\"clock\"></ed-icon>\n    <span>Last saved by you at 2:32 pm · 7 required entries open</span>\n  </p>\n\n  <div class=\"ed-flank ed-align-items-stretch ed-gap-8\" style=\"--ed-flank-size: 16rem\">\n    <div>\n      <div class=\"f02-rail ed-py-2\">\n        <ed-scrollspy label=\"Sections of the master data\">\n          <ed-scrollspy-item href=\"#f02-person\">Person</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-address\">Address</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-employment\">Employment</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-contract\">Contract and working time</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-pay\">Pay</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-tax\">Tax</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-social-insurance\">Social insurance</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-health-insurance\">Health insurance fund</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-company-pension\">Company pension scheme</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-bank\">Bank details</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-absences\">Absences and leave</ed-scrollspy-item>\n          <ed-scrollspy-item href=\"#f02-other\">Other and notes</ed-scrollspy-item>\n        </ed-scrollspy>\n      </div>\n    </div>\n\n    <form id=\"f02-form\" class=\"f02-form ed-stack ed-gap-12\" style=\"max-inline-size: 64rem\">\n      <ed-notification id=\"f02-missing\" variant=\"danger\" open hidden>\n        <span id=\"f02-missing-title\"></span>\n        <ul id=\"f02-missing-list\" slot=\"description\" class=\"ed-list-plain ed-stack ed-gap-1 ed-m-0\"></ul>\n      </ed-notification>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-person\">Person</h2>\n          <p class=\"ed-caption-m\">The details come from the personnel questionnaire and the identity document.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"personnel-number\" label=\"Personnel number\" value=\"00147\" readonly hint=\"Assigned on March 1, 2021\"></ed-input>\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"salutation\" label=\"Salutation\" value=\"mr\" required>\n            <ed-option value=\"ms\">Ms</ed-option>\n            <ed-option value=\"mr\">Mr</ed-option>\n            <ed-option value=\"none\">No salutation</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"title\" label=\"Title\"></ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"name-suffix\" label=\"Name suffix\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"first-name\" label=\"First name\" value=\"Hans-Jürgen\" required></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"last-name\" label=\"Last name\" value=\"Odenthal\" required></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"birth-name\" label=\"Birth name\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"date-of-birth\" label=\"Date of birth\" value=\"1974-06-12\" required></ed-date-picker>\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"gender\" label=\"Gender\" value=\"m\" required>\n            <ed-option value=\"m\">Male</ed-option>\n            <ed-option value=\"f\">Female</ed-option>\n            <ed-option value=\"d\">Diverse</ed-option>\n            <ed-option value=\"x\">Not stated</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"marital-status\" label=\"Marital status\" value=\"married\">\n            <ed-option value=\"single\">Single</ed-option>\n            <ed-option value=\"married\">Married</ed-option>\n            <ed-option value=\"divorced\">Divorced</ed-option>\n            <ed-option value=\"widowed\">Widowed</ed-option>\n            <ed-option value=\"partnership\">Registered civil partnership</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"children\" label=\"Children\" type=\"number\" value=\"2\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"place-of-birth\" label=\"Place of birth\" value=\"Neunkirchen\" required></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"country-of-birth\" label=\"Country of birth\" value=\"Germany\" required></ed-input>\n          <ed-combobox class=\"ed-span-md-4\" name=\"nationality\" label=\"Nationality\" value=\"de\" required>\n            <ed-option value=\"de\">Germany</ed-option>\n            <ed-option value=\"fr\">France</ed-option>\n            <ed-option value=\"lu\">Luxembourg</ed-option>\n            <ed-option value=\"pl\">Poland</ed-option>\n            <ed-option value=\"tr\">Turkey</ed-option>\n          </ed-combobox>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"id-document\" label=\"Identity document\" value=\"Identity card\"></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"id-number\" label=\"Document number\" value=\"L01X00T47\"></ed-input>\n          <ed-date-picker class=\"ed-span-md-4\" name=\"id-valid-until\" label=\"Valid until\" value=\"2029-05-14\"></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"issuing-authority\" label=\"Issuing authority\" value=\"City of Neunkirchen\"></ed-input>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-address\">Address</h2>\n          <p class=\"ed-caption-m\">The registered address; a different postal address is recorded below it.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-9\" name=\"street\" label=\"Street\" value=\"Blumenstraße\" required></ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"house-number\" label=\"No.\" value=\"9a\" required></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"postcode\" label=\"Postcode\" value=\"66538\" required></ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-9\" name=\"city\" label=\"City\" value=\"Neunkirchen\" required></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"district\" label=\"District\" value=\"Wellesweiler\"></ed-input>\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"country\" label=\"Country\" value=\"de\" required>\n            <ed-option value=\"de\">Germany</ed-option>\n            <ed-option value=\"fr\">France</ed-option>\n            <ed-option value=\"lu\">Luxembourg</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"phone\" label=\"Phone\" type=\"tel\" value=\"06821 4471-0\"></ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"mobile\" label=\"Mobile\" type=\"tel\" value=\"0170 2284471\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"private-email\" label=\"Private email\" type=\"email\" value=\"hj.odenthal@web.de\"></ed-input>\n          <ed-input class=\"ed-span-sm-6\" name=\"work-email\" label=\"Work email\" type=\"email\" value=\"h.odenthal@bergmann-ft.de\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"different-postal-address\" hint=\"Shows the fields for the postal address.\">Different postal address</ed-checkbox>\n          <ed-input class=\"ed-span-sm-6\" name=\"po-box\" label=\"PO box\" readonly hint=\"Only with a different postal address\"></ed-input>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-employment\">Employment</h2>\n          <p class=\"ed-caption-m\">Start, establishment and activity — the basis of every notification.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"start-date\" label=\"Start date\" value=\"2021-03-01\" required></ed-date-picker>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"end-date\" label=\"End date\"></ed-date-picker>\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"probation\" label=\"Probation\" value=\"6\">\n            <ed-option value=\"none\">None</ed-option>\n            <ed-option value=\"3\">3 months</ed-option>\n            <ed-option value=\"6\">6 months</ed-option>\n          </ed-select>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"end-of-probation\" label=\"Probation ends\" value=\"2021-08-31\" readonly hint=\"Calculated from start date and duration\"></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-md-4\" name=\"establishment\" label=\"Establishment\" value=\"sb\" required>\n            <ed-option value=\"sb\">Saarbrücken</ed-option>\n            <ed-option value=\"nk\">Neunkirchen</ed-option>\n            <ed-option value=\"sls\">Saarlouis</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-md-4\" name=\"company-number\" label=\"Company number\" value=\"12345678\" readonly></ed-input>\n          <ed-date-picker class=\"ed-span-md-4\" name=\"fixed-term-until\" label=\"Fixed term until\" hint=\"Empty means permanent\"></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-md-4\" name=\"department\" label=\"Department\" value=\"workshop\" required>\n            <ed-option value=\"workshop\">Workshop</ed-option>\n            <ed-option value=\"administration\">Administration</ed-option>\n            <ed-option value=\"sales\">Sales</ed-option>\n            <ed-option value=\"warehouse\">Warehouse</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-md-4\" name=\"cost-center\" label=\"Cost center\" value=\"1200\"></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"supervisor\" label=\"Supervisor\" value=\"Marianne Kessler-Brandt\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"job\" label=\"Job performed\" value=\"Automotive mechatronics technician, commercial vehicles\" required></ed-input>\n          <ed-combobox class=\"ed-span-sm-6\" name=\"activity-code\" label=\"Activity code\" required>\n            <ed-option value=\"25213\">25213 — Automotive engineering, skilled worker</ed-option>\n            <ed-option value=\"25222\">25222 — Automotive engineering, specialist</ed-option>\n            <ed-option value=\"71402\">71402 — Office and secretarial work</ed-option>\n          </ed-combobox>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6\" name=\"employment-type\" label=\"Employment type\" value=\"full-time\" required>\n            <ed-option value=\"full-time\">Full time</ed-option>\n            <ed-option value=\"part-time\">Part time</ed-option>\n            <ed-option value=\"marginal\">Marginal employment</ed-option>\n            <ed-option value=\"apprentice\">Apprenticeship</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-sm-6\" name=\"person-group\" label=\"Person group\" value=\"101\" required>\n            <ed-option value=\"101\">101 — Employees subject to social insurance</ed-option>\n            <ed-option value=\"109\">109 — Marginally paid</ed-option>\n            <ed-option value=\"102\">102 — Apprentices</ed-option>\n          </ed-select>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-contract\">Contract and working time</h2>\n          <p class=\"ed-caption-m\">Weekly hours and working days determine how leave and absences are calculated.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"weekly-hours\" label=\"Weekly hours\" inputmode=\"decimal\" value=\"38.5\" required>\n            <span slot=\"end\">hrs</span>\n          </ed-input>\n          <ed-number-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"days-per-week\" label=\"Working days/week\" value=\"5\" min=\"1\" max=\"7\" required hint=\"1 to 7 days\"></ed-number-input>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" type=\"time\" name=\"start-of-work\" label=\"Start of work\" value=\"08:00\"></ed-date-picker>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" type=\"time\" name=\"end-of-work\" label=\"End of work\" value=\"16:30\"></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" type=\"time\" name=\"break\" label=\"Break\" value=\"00:30\" hint=\"As a duration\"></ed-date-picker>\n          <ed-number-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"core-time-from\" label=\"Core time from\" value=\"9\" min=\"0\" max=\"23\" hint=\"Only with flextime\"></ed-number-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"pay-grade\" label=\"Pay grade\" value=\"E 6\"></ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"pay-level\" label=\"Pay level\" value=\"3\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6\" name=\"working-time-model\" label=\"Working time model\" value=\"flextime\" required>\n            <ed-option value=\"fixed\">Fixed hours</ed-option>\n            <ed-option value=\"flextime\">Flextime</ed-option>\n            <ed-option value=\"shifts\">Shift work</ed-option>\n            <ed-option value=\"trust\">Trust-based working time</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-sm-6\" name=\"collective-agreement\" label=\"Collective agreement\" value=\"motor-trade\">\n            <ed-option value=\"motor-trade\">Motor vehicle trade, Saarland</ed-option>\n            <ed-option value=\"none\">No collective agreement</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"grade-from\" label=\"Graded from\" value=\"2024-01-01\"></ed-date-picker>\n          <ed-number-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"annual-leave\" label=\"Leave entitlement\" value=\"30\" min=\"0\" max=\"60\" required hint=\"0 to 60 days\">\n            <span slot=\"end\">days</span>\n          </ed-number-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"leave-last-year\" label=\"Remaining leave last year\" type=\"number\" value=\"4\" readonly>\n            <span slot=\"end\">days</span>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"leave-taken\" label=\"Already taken\" type=\"number\" value=\"17\" readonly>\n            <span slot=\"end\">days</span>\n          </ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"notice-period\" label=\"Notice period\" type=\"number\" value=\"2\">\n            <span slot=\"end\">months</span>\n          </ed-input>\n          <ed-select class=\"ed-span-sm-6\" name=\"notice-to\" label=\"Notice to\" value=\"end-of-month\">\n            <ed-option value=\"end-of-month\">End of month</ed-option>\n            <ed-option value=\"end-of-quarter\">End of quarter</ed-option>\n            <ed-option value=\"15\">15th or end of month</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"shift-allowance-entitlement\" checked>Entitled to shift allowance</ed-checkbox>\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"overtime-paid\" checked hint=\"Otherwise it counts as covered by the salary.\">Overtime is paid</ed-checkbox>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-pay\">Pay</h2>\n          <p class=\"ed-caption-m\">Regular pay only; one-off payments are recorded in the payroll run.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"pay-type\" label=\"Pay type\" value=\"monthly\" required>\n            <ed-option value=\"monthly\">Monthly salary</ed-option>\n            <ed-option value=\"hourly\">Hourly wage</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"base-pay\" label=\"Base pay\" inputmode=\"decimal\" value=\"3842.00\" required>\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"hourly-rate\" label=\"Hourly rate\" inputmode=\"decimal\" readonly hint=\"Only with hourly wage\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"pay-valid-from\" label=\"Valid from\" value=\"2026-01-01\" required></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"shift-allowance\" label=\"Shift allowance\" inputmode=\"decimal\" value=\"180.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"performance-bonus\" label=\"Performance bonus\" inputmode=\"decimal\" value=\"120.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"savings-benefit\" label=\"Employer savings benefit\" inputmode=\"decimal\" value=\"26.59\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"travel-allowance\" label=\"Travel allowance\" inputmode=\"decimal\" value=\"44.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"company-car\" label=\"Company car benefit\" inputmode=\"decimal\" value=\"0.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"meal-allowance\" label=\"Meal allowance\" inputmode=\"decimal\" value=\"0.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"payment-method\" label=\"Payment method\" value=\"transfer\" required>\n            <ed-option value=\"transfer\">Bank transfer</ed-option>\n            <ed-option value=\"cash\">Cash payment</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"payment-day\" label=\"Payment day\" type=\"number\" value=\"25\" hint=\"Day of the month\"></ed-input>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-tax\">Tax</h2>\n          <p class=\"ed-caption-m\">The tax features are retrieved from ELStAM and only recorded here.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"tax-id\" label=\"Tax identification no.\" required hint=\"Eleven digits, issued by the Federal Central Tax Office\"></ed-input>\n          <ed-select class=\"ed-span-md-4\" name=\"tax-class\" label=\"Tax class\" required>\n            <ed-option value=\"1\">I</ed-option>\n            <ed-option value=\"2\">II</ed-option>\n            <ed-option value=\"3\">III</ed-option>\n            <ed-option value=\"4\">IV</ed-option>\n            <ed-option value=\"5\">V</ed-option>\n            <ed-option value=\"6\">VI</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-md-4\" name=\"child-allowances\" label=\"Child allowances\" inputmode=\"decimal\" value=\"2.0\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6\" name=\"denomination\" label=\"Denomination\" required>\n            <ed-option value=\"protestant\">Protestant</ed-option>\n            <ed-option value=\"catholic\">Roman Catholic</ed-option>\n            <ed-option value=\"none\">No church tax</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-sm-6\" name=\"spouse-denomination\" label=\"Spouse’s denomination\" value=\"catholic\">\n            <ed-option value=\"protestant\">Protestant</ed-option>\n            <ed-option value=\"catholic\">Roman Catholic</ed-option>\n            <ed-option value=\"none\">No church tax</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"factor-method\" label=\"Factor method\" value=\"no\">\n            <ed-option value=\"no\">Not applied</ed-option>\n            <ed-option value=\"yes\">Applied</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"annual-allowance\" label=\"Annual tax allowance\" inputmode=\"decimal\" value=\"0.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"additional-amount\" label=\"Additional amount\" inputmode=\"decimal\" value=\"0.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"elstam-retrieved\" label=\"Last ELStAM retrieval\" value=\"2026-01-08\" readonly></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-md-4\" name=\"elstam-status\" label=\"ELStAM status\" value=\"registered\" readonly>\n            <ed-option value=\"registered\">Registered</ed-option>\n            <ed-option value=\"deregistered\">Deregistered</ed-option>\n            <ed-option value=\"pending\">Registration pending</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-md-4\" name=\"employment-relationship\" label=\"Employment relationship\" value=\"main\" required>\n            <ed-option value=\"main\">Main employer</ed-option>\n            <ed-option value=\"secondary\">Secondary employer</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-md-4\" name=\"flat-rate\" label=\"Flat-rate taxation\" value=\"none\">\n            <ed-option value=\"none\">None</ed-option>\n            <ed-option value=\"2\">2 %</ed-option>\n            <ed-option value=\"20\">20 %</ed-option>\n            <ed-option value=\"25\">25 %</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"church-tax\" checked>Church tax withheld</ed-checkbox>\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"solidarity-surcharge\" checked>Check solidarity surcharge</ed-checkbox>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-social-insurance\">Social insurance</h2>\n          <p class=\"ed-caption-m\">Contribution groups and levies; the key is formed from the entries.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"insurance-number\" label=\"Insurance number\" required hint=\"On the social insurance card.\"></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"contribution-key\" label=\"Contribution group key\" value=\"1111\" readonly hint=\"Formed from the four entries\"></ed-input>\n          <ed-select class=\"ed-span-md-4\" name=\"transition-zone\" label=\"Transition zone\" value=\"no\">\n            <ed-option value=\"no\">Not in the transition zone</ed-option>\n            <ed-option value=\"yes\">In the transition zone</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6\" name=\"health-insurance\" label=\"Health insurance\" value=\"1\" required>\n            <ed-option value=\"1\">1 — General contribution</ed-option>\n            <ed-option value=\"0\">0 — No contribution</ed-option>\n            <ed-option value=\"3\">3 — Reduced contribution</ed-option>\n            <ed-option value=\"9\">9 — Paid by the company</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-sm-6\" name=\"pension-insurance\" label=\"Pension insurance\" value=\"1\" required>\n            <ed-option value=\"1\">1 — Full contribution</ed-option>\n            <ed-option value=\"0\">0 — No contribution</ed-option>\n            <ed-option value=\"3\">3 — Half contribution</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6\" name=\"unemployment-insurance\" label=\"Unemployment insurance\" value=\"1\" required>\n            <ed-option value=\"1\">1 — Full contribution</ed-option>\n            <ed-option value=\"0\">0 — No contribution</ed-option>\n            <ed-option value=\"2\">2 — Half contribution</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-sm-6\" name=\"care-insurance\" label=\"Long-term care insurance\" value=\"1\" required>\n            <ed-option value=\"1\">1 — Full contribution</ed-option>\n            <ed-option value=\"0\">0 — No contribution</ed-option>\n            <ed-option value=\"2\">2 — Half contribution</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-md-4\" name=\"levy-u1\" label=\"U1 levy\" value=\"yes\">\n            <ed-option value=\"yes\">Liable</ed-option>\n            <ed-option value=\"no\">Not liable</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-md-4\" name=\"levy-u2\" label=\"U2 levy\" value=\"yes\">\n            <ed-option value=\"yes\">Liable</ed-option>\n            <ed-option value=\"no\">Not liable</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-md-4\" name=\"insolvency-levy\" label=\"Insolvency benefit levy\" value=\"yes\">\n            <ed-option value=\"yes\">Liable</ed-option>\n            <ed-option value=\"no\">Not liable</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"other-employment-pay\" label=\"Pay from other employment\" inputmode=\"decimal\" value=\"0.00\" readonly hint=\"Only with multiple employment\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"multiple-employment\">Multiple employment</ed-checkbox>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"private-health-insurance\">Privately health insured</ed-checkbox>\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"pension-exemption\">Exempt from compulsory pension insurance</ed-checkbox>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-health-insurance\">Health insurance fund</h2>\n          <p class=\"ed-caption-m\">The fund sets the additional contribution and where the contributions are paid.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-combobox class=\"ed-span-sm-6\" name=\"health-insurance-fund\" label=\"Health insurance fund\" required>\n            <ed-option value=\"aok\">AOK Rheinland-Pfalz/Saarland</ed-option>\n            <ed-option value=\"tk\">Techniker Krankenkasse</ed-option>\n            <ed-option value=\"barmer\">BARMER</ed-option>\n            <ed-option value=\"dak\">DAK-Gesundheit</ed-option>\n            <ed-option value=\"ikk\">IKK Südwest</ed-option>\n          </ed-combobox>\n          <ed-input class=\"ed-span-sm-6\" name=\"fund-company-number\" label=\"Company number of the fund\" readonly hint=\"From the fund\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"additional-rate\" label=\"Additional contribution\" inputmode=\"decimal\" readonly hint=\"Set by the fund\">\n            <ed-icon slot=\"end\" name=\"percent\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"childless-surcharge\" label=\"Surcharge for the childless\" inputmode=\"decimal\" value=\"0.00\" readonly hint=\"Not with children\">\n            <ed-icon slot=\"end\" name=\"percent\"></ed-icon>\n          </ed-input>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"member-since\" label=\"Member since\" value=\"2021-03-01\"></ed-date-picker>\n          <ed-date-picker class=\"ed-span-sm-6 ed-span-md-3\" name=\"last-notification\" label=\"Last notification\" value=\"2026-08-01\" readonly></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6\" name=\"reporting-channel\" label=\"Reporting channel\" value=\"dakota\">\n            <ed-option value=\"dakota\">DAKOTA</ed-option>\n            <ed-option value=\"sv-net\">sv.net</ed-option>\n          </ed-select>\n          <ed-select class=\"ed-span-sm-6\" name=\"contribution-payer\" label=\"Contribution payer\" value=\"employer\">\n            <ed-option value=\"employer\">Employer</ed-option>\n            <ed-option value=\"employee\">Employee</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"fund-contact\" label=\"Contact at the fund\"></ed-input>\n          <ed-input class=\"ed-span-sm-6\" name=\"fund-phone\" label=\"Phone of the fund\" type=\"tel\"></ed-input>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-company-pension\">Company pension scheme</h2>\n          <p class=\"ed-caption-m\">Deferred compensation and subsidies; each commitment is kept on its own.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-sm-6\" name=\"pension-vehicle\" label=\"Funding vehicle\" value=\"direct-insurance\" required>\n            <ed-option value=\"none\">No commitment</ed-option>\n            <ed-option value=\"direct-insurance\">Direct insurance</ed-option>\n            <ed-option value=\"pension-fund\">Pension fund</ed-option>\n            <ed-option value=\"support-fund\">Support fund</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6\" name=\"pension-provider\" label=\"Provider\" value=\"Allianz Lebensversicherung\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"pension-contract-number\" label=\"Contract number\" value=\"LV 4471 2284 09\"></ed-input>\n          <ed-date-picker class=\"ed-span-md-4\" name=\"pension-start\" label=\"Start\" value=\"2022-01-01\"></ed-date-picker>\n          <ed-select class=\"ed-span-md-4\" name=\"pension-increase\" label=\"Increase\" value=\"3\">\n            <ed-option value=\"none\">None</ed-option>\n            <ed-option value=\"3\">3 % a year</ed-option>\n            <ed-option value=\"5\">5 % a year</ed-option>\n          </ed-select>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"deferred-compensation\" label=\"Deferred compensation\" inputmode=\"decimal\" value=\"150.00\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"employer-subsidy\" label=\"Employer subsidy\" inputmode=\"decimal\" value=\"22.50\" readonly hint=\"15 % of the deferred compensation\">\n            <ed-icon slot=\"end\" name=\"euro\"></ed-icon>\n          </ed-input>\n          <ed-select class=\"ed-span-sm-6 ed-span-md-3\" name=\"pension-taxation\" label=\"Taxation\" value=\"3-63\">\n            <ed-option value=\"3-63\">§ 3 No. 63 EStG</ed-option>\n            <ed-option value=\"40b\">§ 40b EStG, old version</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"pension-maximum\" label=\"Maximum amount used\" type=\"number\" inputmode=\"decimal\" without-spin-buttons step=\"0.01\" value=\"41.2\" readonly>\n            <ed-icon slot=\"end\" name=\"percent\"></ed-icon>\n          </ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-date-picker class=\"ed-span-md-4\" name=\"pension-next-adjustment\" label=\"Next adjustment\" value=\"2027-01-01\" readonly></ed-date-picker>\n          <ed-select class=\"ed-span-md-4\" name=\"savings-plan\" label=\"Savings plan type\" value=\"building-society\">\n            <ed-option value=\"building-society\">Building society savings contract</ed-option>\n            <ed-option value=\"fund\">Fund savings plan</ed-option>\n            <ed-option value=\"none\">None</ed-option>\n          </ed-select>\n          <ed-input class=\"ed-span-md-4\" name=\"savings-contract-number\" label=\"Savings contract number\" value=\"BS 88 4471 03\"></ed-input>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-bank\">Bank details</h2>\n          <p class=\"ed-caption-m\">The pay is transferred to this account.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"account-holder\" label=\"Account holder\" value=\"Hans-Jürgen Odenthal\" required></ed-input>\n          <ed-input class=\"ed-span-sm-6\" name=\"iban\" label=\"IBAN\" required hint=\"With or without spaces.\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"bic\" label=\"BIC\" readonly hint=\"From the IBAN\"></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"bank-name\" label=\"Bank\" readonly hint=\"From the IBAN\"></ed-input>\n          <ed-date-picker class=\"ed-span-md-4\" name=\"bank-valid-from\" label=\"Valid from\" value=\"2021-03-01\"></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-select class=\"ed-span-md-4\" name=\"account-use\" label=\"Use\" value=\"both\">\n            <ed-option value=\"pay\">Pay</ed-option>\n            <ed-option value=\"expenses\">Expenses</ed-option>\n            <ed-option value=\"both\">Pay and expenses</ed-option>\n          </ed-select>\n          <ed-checkbox class=\"ed-span-md-4\" name=\"different-holder\">Different account holder</ed-checkbox>\n          <ed-input class=\"ed-span-md-4\" name=\"payment-reference\" label=\"Fixed payment reference\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"expenses-iban\" label=\"IBAN for expenses\" readonly hint=\"Only with a separate expenses account\"></ed-input>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-absences\">Absences and leave</h2>\n          <p class=\"ed-caption-m\">The status of the current year; individual periods are recorded in the calendar.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"leave-from-contract\" label=\"Entitlement from the contract\" type=\"number\" value=\"30\" readonly hint=\"Stated under “Contract and working time”\">\n            <span slot=\"end\">days</span>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"leave-remaining\" label=\"Remaining entitlement\" type=\"number\" value=\"17\" readonly hint=\"30 from the contract + 4 from last year − 17 taken\">\n            <span slot=\"end\">days</span>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"child-sick-days\" label=\"Child sick days\" type=\"number\" value=\"2\" readonly>\n            <span slot=\"end\">days</span>\n          </ed-input>\n          <ed-input class=\"ed-span-sm-6 ed-span-md-3\" name=\"special-leave\" label=\"Special leave\" type=\"number\" value=\"0\">\n            <span slot=\"end\">days</span>\n          </ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-date-picker class=\"ed-span-md-4\" name=\"leave-expires\" label=\"Remaining leave expires\" value=\"2027-03-31\" readonly></ed-date-picker>\n          <ed-input class=\"ed-span-md-4\" name=\"sick-days\" label=\"Sick days 2026\" type=\"number\" value=\"6\" readonly>\n            <span slot=\"end\">days</span>\n          </ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"continued-pay-days\" label=\"Continued pay used\" type=\"number\" value=\"6\" readonly>\n            <span slot=\"end\">days</span>\n          </ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-date-picker class=\"ed-span-md-4\" name=\"continued-pay-end\" label=\"Entitlement ends\" readonly hint=\"During an ongoing illness\"></ed-date-picker>\n          <ed-select class=\"ed-span-md-4\" name=\"leave-year\" label=\"Leave year\" value=\"calendar\">\n            <ed-option value=\"calendar\">Calendar year</ed-option>\n            <ed-option value=\"start-date\">From the start date</ed-option>\n          </ed-select>\n          <ed-checkbox class=\"ed-span-md-4\" name=\"leave-carry-over\" checked>Allow carry-over into the next year</ed-checkbox>\n        </div>\n      </section>\n\n      <section class=\"ed-stack ed-gap-4\">\n        <div class=\"ed-stack ed-gap-1\">\n          <h2 id=\"f02-other\">Other and notes</h2>\n          <p class=\"ed-caption-m\">Whatever fits nowhere else and will be needed again next time.</p>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-sm-6\" name=\"disability-card-number\" label=\"Number of the severe disability card\"></ed-input>\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"equal-status\">Equal status</ed-checkbox>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-number-input class=\"ed-span-md-4\" name=\"degree-of-disability\" label=\"Degree of disability\" value=\"0\" min=\"0\" max=\"100\" step=\"10\" hint=\"0 to 100, in steps of 10\"></ed-number-input>\n          <ed-date-picker class=\"ed-span-md-4\" name=\"disability-card-valid-until\" label=\"Card valid until\"></ed-date-picker>\n          <ed-date-picker class=\"ed-span-md-4\" name=\"work-permit-valid-until\" label=\"Valid until\"></ed-date-picker>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-input class=\"ed-span-md-4\" name=\"work-permit\" label=\"Work permit\" readonly hint=\"Only with a non-EU nationality\"></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"garnishment-reference\" label=\"File reference\"></ed-input>\n          <ed-input class=\"ed-span-md-4\" name=\"garnishment-creditor\" label=\"Creditor\"></ed-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-radio-group class=\"ed-span-sm-6\" appearance=\"button\" name=\"garnishment\" label=\"Garnishment\" value=\"none\">\n            <ed-radio value=\"none\">None</ed-radio>\n            <ed-radio value=\"ongoing\">Ongoing</ed-radio>\n            <ed-radio value=\"suspended\">Suspended</ed-radio>\n          </ed-radio-group>\n          <ed-file-input class=\"ed-span-sm-6\" name=\"garnishment-order\" label=\"Garnishment order\" hint=\"PDF, up to 10 MB\" accept=\".pdf\" max-file-size=\"10\"></ed-file-input>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"company-car-private-use\">Company car for private use</ed-checkbox>\n          <ed-checkbox class=\"ed-span-sm-6\" name=\"workwear\" checked>Workwear provided</ed-checkbox>\n        </div>\n        <div class=\"ed-grid\">\n          <ed-switch class=\"ed-span-sm-6\" name=\"quick-selection\" checked>In quick selection</ed-switch>\n          <ed-switch class=\"ed-span-sm-6\" name=\"notify-on-change\">Notify on changes</ed-switch>\n        </div>\n        <ed-textarea name=\"internal-note\" label=\"Internal note\" rows=\"4\" hint=\"Visible only to the firm; it appears on no payslip.\"></ed-textarea>\n      </section>\n    </form>\n  </div>\n</div>\n\n<script type=\"module\">\n  const form = document.getElementById('f02-form');\n  const search = document.getElementById('f02-search');\n  const hits = document.getElementById('f02-hits');\n  const count = document.getElementById('f02-count');\n  const previous = document.getElementById('f02-previous');\n  const next = document.getElementById('f02-next');\n  const previousTip = document.querySelector('ed-tooltip[for=\"f02-previous\"]');\n  const nextTip = document.querySelector('ed-tooltip[for=\"f02-next\"]');\n\n  // The search runs over the labels and leaves the focus in the search field, so Enter steps\n  // through the matches (SU02). A label moves from its attribute into the label slot, where a mark\n  // can sit in it; a checkbox and a switch carry their label as content already.\n  const entries = [...form.querySelectorAll('[label], ed-checkbox, ed-switch')].map(field => {\n    const text = (field.getAttribute('label') ?? field.textContent).trim();\n    const holder = document.createElement('span');\n    holder.textContent = text;\n    if (field.hasAttribute('label')) {\n      holder.slot = 'label';\n      field.removeAttribute('label');\n      field.prepend(holder);\n    } else {\n      field.replaceChildren(holder);\n    }\n    return { field, text, holder, found: false };\n  });\n\n  let matches = [];\n  let current = -1;\n\n  const reducedMotion = matchMedia('(prefers-reduced-motion: reduce)');\n  const motion = () => (reducedMotion.matches ? 'auto' : 'smooth');\n\n  // scrollIntoView() scrolls every scrollable ancestor, across a frame's border too: a page standing\n  // in an iframe would move the page that holds it. The jump does what it does inside this document\n  // only — every box that scrolls the field centers it, through the shadow trees it is slotted into,\n  // the innermost first and at once, the page last — and leaves a field that is not rendered alone.\n  function reveal(field) {\n    if (!field.checkVisibility()) return;\n    const page = document.scrollingElement;\n    const scrollers = [];\n    for (let node = field; node; ) {\n      const next = node.assignedSlot ?? node.parentNode;\n      node = next instanceof ShadowRoot ? next.host : next instanceof Element ? next : null;\n      if (!node || node === document.documentElement || node === document.body) continue;\n      if (/auto|scroll/.test(getComputedStyle(node).overflowY) && node.scrollHeight > node.clientHeight) scrollers.push(node);\n    }\n    scrollers.push(page);\n    scrollers.forEach((scroller, index) => {\n      // The scrollport, less its scroll-padding: a sticky bar the product sets it for stays clear.\n      const style = getComputedStyle(scroller);\n      const padTop = parseFloat(style.scrollPaddingTop) || 0;\n      const padBottom = parseFloat(style.scrollPaddingBottom) || 0;\n      const top = scroller === page ? 0 : scroller.getBoundingClientRect().top + scroller.clientTop;\n      const height = scroller === page ? document.documentElement.clientHeight : scroller.clientHeight;\n      const box = field.getBoundingClientRect();\n      const offset = box.top - top - padTop - (height - padTop - padBottom - box.height) / 2;\n      scroller.scrollBy({ top: offset, behavior: index === scrollers.length - 1 ? motion() : 'instant' });\n    });\n  }\n\n  function paint(entry, term) {\n    const at = term ? entry.text.toLowerCase().indexOf(term) : -1;\n    entry.found = at >= 0;\n    if (!entry.found) {\n      entry.holder.textContent = entry.text;\n      return;\n    }\n    const mark = Object.assign(document.createElement('mark'), { textContent: entry.text.slice(at, at + term.length) });\n    entry.holder.replaceChildren(entry.text.slice(0, at), mark, entry.text.slice(at + term.length));\n  }\n\n  function go(index) {\n    matches[current]?.holder.classList.remove('f02-current');\n    current = index;\n    const focused = [previous, next].find(button => button === document.activeElement);\n    previous.disabled = current <= 0;\n    next.disabled = current < 0 || current >= matches.length - 1;\n    // A disabled button can be pointed at but not focused, so what it shows on hover says why it is\n    // unavailable. Its aria-label stays its name.\n    previousTip.textContent = previous.disabled ? 'No earlier match' : 'Previous match';\n    nextTip.textContent = next.disabled ? 'No later match' : 'Next match';\n    // A button disabled while focused would drop the focus to the page; its partner takes it, or the\n    // search field when both are disabled.\n    if (focused?.disabled) {\n      const partner = focused === next ? previous : next;\n      (partner.disabled ? search : partner).focus();\n    }\n    if (!search.value.trim()) count.textContent = '';\n    else count.textContent = matches.length ? `Match ${current + 1} of ${matches.length}` : 'No matches';\n    if (current < 0) return;\n    matches[current].holder.classList.add('f02-current');\n    reveal(matches[current].field);\n  }\n\n  // The first match is jumped to as soon as there is one: \"1 of 5\" with the field out of view would\n  // say where it is without showing it.\n  function find() {\n    const term = search.value.trim().toLowerCase();\n    // The fill sits on the label, which outlives the search; the old current one loses it here.\n    matches[current]?.holder.classList.remove('f02-current');\n    for (const entry of entries) paint(entry, term);\n    matches = entries.filter(entry => entry.found);\n    hits.hidden = !term;\n    current = -1;\n    go(matches.length ? 0 : -1);\n  }\n\n  search.addEventListener('input', find);\n  search.addEventListener('ed-clear', find);\n\n  search.addEventListener('keydown', event => {\n    // Safari ends the composition before the Enter that confirms it, and reports that press as 229.\n    if (event.isComposing || event.keyCode === 229) return;\n    // Enter steps and submits nothing; at either end it stays, where the arrows stop too.\n    if (event.key === 'Enter') {\n      event.preventDefault();\n      if (event.shiftKey) {\n        if (current > 0) go(current - 1);\n      } else if (current < matches.length - 1) {\n        go(current + 1);\n      }\n      return;\n    }\n    // Tab goes into the field the search stands on, as the next Tab after a browser's find lands\n    // behind its match. A field that cannot take the focus, disabled or hidden, leaves Tab its own way.\n    if (event.key === 'Tab' && !event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey && current >= 0) {\n      if (reach(matches[current].field)) event.preventDefault();\n    }\n  });\n\n  previous.addEventListener('click', () => current > 0 && go(current - 1));\n  next.addEventListener('click', () => current < matches.length - 1 && go(current + 1));\n\n  const complete = document.getElementById('f02-complete');\n  const missing = document.getElementById('f02-missing');\n  const missingTitle = document.getElementById('f02-missing-title');\n  const missingList = document.getElementById('f02-missing-list');\n  const labels = new Map(entries.map(entry => [entry.field, entry.text]));\n\n  // A jump ends in the field, and says whether the field took the focus. The scroll runs smoothly,\n  // so the focus must not start a second one.\n  function reach(field) {\n    field.focus({ preventScroll: true });\n    if (!field.matches(':focus-within')) return false;\n    reveal(field);\n    return true;\n  }\n\n  function entryFor(field) {\n    field.id ||= `f02-field-${field.getAttribute('name')}`;\n    const link = Object.assign(document.createElement('a'), { href: `#${field.id}`, textContent: labels.get(field) });\n    link.addEventListener('click', event => {\n      event.preventDefault();\n      reach(field);\n    });\n    const section = Object.assign(document.createElement('span'), {\n      className: 'ed-caption-s',\n      textContent: ` — ${field.closest('section').querySelector('h2').textContent}`\n    });\n    const item = document.createElement('li');\n    item.append(link, section);\n    return item;\n  }\n\n  // Completing asks for every required entry. The list is the one way to the open fields, so it stays\n  // at the top of the form, and the focus goes into the first of them, as a submitted form does.\n  complete.addEventListener('click', () => {\n    // Named controls only: an ed-input's own inner <input> carries `required` too, and has no name.\n    const open = [...form.querySelectorAll('[required]')].filter(\n      field => field.name && String(field.value ?? '').trim() === ''\n    );\n    missing.hidden = !open.length;\n    if (!open.length) return;\n    missingTitle.textContent = open.length === 1 ? 'One required entry is still missing' : `${open.length} required entries are still missing`;\n    missingList.replaceChildren(...open.map(entryFor));\n    reach(open[0]);\n  });\n</script>",
  "page": "https://test-apps.eurodata.de/a/eurodata-ui/docs/patterns/forms/f02-long-form/",
  "topicPage": "https://test-apps.eurodata.de/a/eurodata-ui/docs/patterns/forms/"
}
