Form field standard for every form on this site
Use the same label, required marking, helper text, placeholder rule, and error placement on public forms and on signed in create, edit, and settings forms. This page states the standard and shows a before and after example for each pattern found in the current forms.
The standard in one view
Apply every row on every form. A field that cannot meet a row is changed in the same release that adds it.
| Part | Standard |
|---|---|
| Label wording | One noun phrase in sentence case that names the value the person enters, such as Work email, Source link, or Review date. Use the same wording for the same value on every form. Do not add please, enter, or type to the label. Do not repeat the label in the helper text. |
| Required marking | Required fields show an asterisk in the label plus the words required in screen reader text, and the field carries required and aria-required. Optional fields use no asterisk and carry no required attribute. A note above the first field states that fields marked with an asterisk are required. |
| Helper text | Every field has one helper paragraph in that order, label, field, helper text, error text. The helper text states the format, the source of the value, or the limit in one short sentence. The field lists the helper text id in aria-describedby. |
| Placeholder use | A placeholder shows a format example only, such as https://example.edu/page, and never repeats the label and never replaces helper text. A field with no format example has no placeholder. |
| Error placement | A field error is one paragraph after the helper text, with an id formed from the field id plus error. The field carries aria-invalid and lists the error id in aria-describedby. A form summary with role alert states the count of fields that need attention and receives focus. Correcting a field removes its error. |
| Grouping | One form element covers one task. Related fields sit in one fieldset with one legend that names the group in sentence case, such as Contact details, Your college and role, or What you want to try first. Each field sits in one field div in the order label, field, helper text, error text. A honeypot field and the submit controls sit outside the fieldsets. A calculator or filter block that collects counts uses one fieldset per period or per scope group, with a legend naming the group, so the scope and the period are read before any count field. |
| Primary submit-button treatment | A mutating form has exactly one primary submit button, placed last in the form after all fieldsets, with type submit and the primary button class. The label is a verb plus the object of the task, such as Send request, Send question, Save answer, Save changes when editing, Follow question, Save draft, or Save entry, and the same verb and object are used for the same task on every form. Secondary actions use the non-primary button class with type button. While a send is in progress the primary button carries aria-disabled and aria-busy, fields are disabled, and a second submit is blocked, with entries kept on the page for one retry with the same request reference where a retry rule exists. A calculator, filter, search, or draft checker block has no primary submit, type submit, or send action, its Check, Download, Clear, or Copy actions use the non-primary button class with type button except for one clearly named primary action such as Check draft, and the block states that nothing entered is sent or saved by that block where that is the case. |
| Size and focus | Field text is at least 16 pixels, each control is at least 44 pixels high, focus stays visible, and the layout stacks to one column on a phone. |
Inventory of every form in this pack
Use this inventory before you add or change a form. A form not listed here does not exist in this site slice and must not be claimed on a page. Signed-in forms in the last table have no screen file in this site slice, as the app kit catalog states, and this standard applies to them when those screens are built.
| Form | Where in the pack | Grouping and primary submit |
|---|---|---|
| Demo request form | public/request-demo.html, form with data-request demo in the demo form card | Fieldsets Contact details, Your college and role, and What you want to try first, with one legend each. One primary submit button Send request, placed last, with the primary class and type submit. |
| Question and feedback form | public/request-demo.html, form with data-request question in the ask a question section | Fieldsets Contact details, Your college and role, and What you need help with, with one legend each. One primary submit button Send question, placed last, with the primary class and type submit. |
| Source review request form | public/guides/request-source-review.html, form with data-request question | Same fieldsets and field names as the question form. One primary submit button Send question, placed last, with the primary class and type submit. |
| Form | Where in the pack | Grouping and primary submit |
|---|---|---|
| Save or edit an answer | public/my-answers.html, form id ma-form | Fieldsets The answer you saved, The source behind it, and Where it lives, with one legend each. One primary submit button Save answer, and Save changes in edit mode, placed last, with the primary class and type submit. Cancel edit is a secondary button with type button. |
| Add a collection | public/my-answers.html, form id ma-coll-form | One field for Collection name with helper text. One submit button Add collection, placed last, with the primary class and type submit. The field is optional in the current form and must follow the required marking row in the standard. |
| Follow a question | public/my-follows.html, form id mf-form | One group of Title, Question as you asked it, College workspace, and Assistant. One primary submit button Follow question, placed last, with the primary class and type submit. Title is the only required field. |
| Question draft | public/offline.html, form id off-draft-form | One group of College workspace, Assistant, and Question draft. One primary submit button Save draft, placed in the button row, with the primary class and type submit. Copy draft and Clear draft are secondary buttons with type button. |
| Answer pack entry | public/offline.html, form id off-pack-form | One group of Title, Question as asked, Short answer, Source title, Source link, Last checked date, College workspace, and Assistant. One primary submit button Save entry, placed last, with the primary class and type submit. Title is the only required field. |
| Anonymous question draft checker | public/guides/anonymous-question.html, fieldsets Your draft and Checked result | Fieldsets Your draft and Checked result, with one legend each. No primary submit and no send, because nothing entered is sent to a server. Check draft is the one named primary action with type button, and Copy clean copy, Save draft on this device, and Clear draft are secondary buttons with type button, disabled until Check draft has run. |
| Sample question and source review report | public/try-sample.html, question input id demo-q with Ask sample button, and report textarea id demo-report-text with Copy source review request button | No form element and no server send. Ask sample is the one named primary action with type button. Helpful, Not helpful, Report this answer, Copy with sources, and Save to My Answers are secondary buttons with type button. |
| First answer defaults | public/guides/first-answer.html, defaults form with college name and topic fields | One group per defaults topic, with helper text on every field and no placeholder as the only instruction. The save action for those defaults is the primary submit for that task and follows the primary submit row. |
| Saved guide item | public/guides/index.html, saved items form with Answer title, topic, and source link fields | One group for the saved item fields. One primary submit button for the save task, placed last, with the primary class and type submit. |
| Import file controls | public/my-answers.html import file input, public/my-data.html import file input, and public/offline.html import file input | File inputs sit outside any mutating form, with a label, helper text stating the file form and size limit, and a status line with role status. No primary submit is attached to a file input. |
| Block | Where in the pack | Grouping and primary submit |
|---|---|---|
| Cohort calculator | public/analytics-funnel.html, block id cohort-calculator | One group for Cohort label, Cohort date, Cohort workspaces, Retained on D1, Retained on D7, Retained on D30, and Excluded workspaces. No form element and no primary submit. Download cohort counts and rates as CSV and Clear counts are secondary buttons with type button. |
| Trend calculator | public/answer-insight.html, block id trend-calculator | Scope group for College workspace, Assistant, and Channel, date group for the four period dates, and fieldsets Current period counts and Previous period counts, with one legend each. No form element and no primary submit. Download trend as CSV and Clear counts are secondary buttons with type button. |
| Workspace dashboard calculator | public/reports.html, block id workspace-dashboard-calculator | One group for College workspace name, Questions asked, Answered, Handed off, Not answered, Helpful, and Not helpful. No form element and no primary submit. Download counts and rates as CSV and Clear counts are secondary buttons with type button. |
| Embed builder | public/widget.html, block id embed-builder | One group for Endpoint from Widget setup, Widget title, Live college page address, and Assistant name. No form element and no primary submit. Copy embed snippet, Copy share link, and Copy LMS and portal steps are secondary buttons with type button. |
| Terminology search | public/site.js, search block injected on the terminology page | One search field with a label, helper text, a status line, and a Clear search secondary button with type button. No primary submit and no send. |
| Guides search and filter, My Answers search and filter, Saved Essentials search and filter, Print answers search and filter, and offline pack search and filter | public/guides/index.html, public/my-answers.html, public/my-essentials.html, public/print-answers.html, and public/offline.html | One group each for Search saved answers, Collection, College workspace, Assistant, and Sort as the page offers, with a filter count status line and a Clear search and filters secondary button with type button. No primary submit and no send. |
| Form | Described in | Grouping and primary submit when built |
|---|---|---|
| Sign-in and workspace selection | public/guides/get-started.html and public/app/index.html | No local email or password field is added. Sign-in uses the MAJIC account, and workspace selection is a select for the college workspace, not a creation form, because there is no create workspace step in the app and a workspace is provisioned after a demo request. |
| Team invite and role assignment | public/guides/get-started.html, invite and role setup sequence | One group for the invited person email and the one role. One primary submit button for the invite task, placed last, with the primary class and type submit. |
| Add or edit a source, and approval decision | public/guides/approve-source.html and public/sources.html | Fieldsets for the source title, type, and link or file, the owner office and review date, and the approval decision where the page offers it, with one legend each. One primary submit button for the add, edit, or decision task, placed last, with the primary class and type submit. |
| Build or edit an assistant | public/guides/build-assistant.html and public/assistants.html | Fieldsets for name and welcome text, covered topics, approved sources, and handoff office, with one legend each. One primary submit button for the save task, placed last, with the primary class and type submit. |
| Retention and access settings, and notification preferences | public/guides/set-retention-and-access.html and public/notifications.html | Fieldsets per setting group, with one legend each, and one control per reminder type with the type named in the label. One primary submit button for the save task, placed last, with the primary class and type submit. Mute all is a separate control for that college only. |
| Ask question submission, and handoff to an office | public/guides/ask-and-check-sources.html and public/guides/hand-off-to-office.html | One group for the question as asked, with the assistant named outside the field, and one group for the handoff office and contact details where the handoff form offers them. One primary submit button for the ask task and one for the handoff task, each placed last in its own form, with the primary class and type submit. |
| Test panel result, and Widget setup | public/guides/test-answers.html and public/guides/publish-widget.html | One group for the test result and note, and one group for widget title, welcome text, colors, and handoff office, with one legend each. One primary submit button for each save task, placed last, with the primary class and type submit. |
When a signed-in screen is built, add each form above to the inventory in this section in the same change, with the screen name and the primary button label, and apply every row in the standard table.
Patterns found in the current forms
Each row names the pattern, where it appears in this pack, and the change the standard makes.
| Pattern | Where it appears | Change |
|---|---|---|
| Asterisk only for required, or no marking | My Answers, the reports calculator, the answer quality calculator, and the first answer defaults form | Add screen reader text for required and the required note, or remove the asterisk for optional fields |
| Helper text on some fields and none on others | My Answers and both calculators, where some fields have help text and the rest have none | Add one helper paragraph to every field and link it with aria-describedby |
| Placeholder as the only instruction | The first answer defaults form, where the placeholder tells the person what to type | Move the instruction to helper text and keep a placeholder only for a format example |
| Status line only for errors | My Answers, both calculators, and the first answer defaults form | Add a per field error after the helper text, with aria-invalid and a focused summary |
| Same value, different label wording | Title, question or answer title, and source title across the saved answers and saved items forms | Use one label wording per value on every form, as listed in the examples below |
| Fields with no group, or a calculator block with no fieldset | Followed question form, offline draft and pack forms, cohort calculator, workspace dashboard calculator, and embed builder, where fields sit in one flat group with no legend naming the scope or period | Add one fieldset with one legend per group, and one fieldset per period or scope group on calculator blocks, as in the grouping row |
| More than one primary-looking button, or no named primary action | Calculator blocks and search and filter blocks, where Download, Clear, Copy, and filter actions all use the same button style, and the anonymous draft checker, where Check draft is the only action that moves the task forward | Keep exactly one primary submit on mutating forms and name the one primary action on calculator, filter, and checker blocks, with all other actions as secondary buttons with type button, as in the primary submit-button treatment row |
Server-side validation inventory for mutating endpoints in this pack
This inventory covers every mutating server endpoint a client in this pack can call, compares client-submitted fields with documented server limits in Configuration manifest and Configuration and safe defaults, and states a correction for each gap. No rule is invented where the pack does not document a server schema. Read the endpoint table first, then the field table for POST /api/public/request, then the gaps.
| Endpoint | Client in this pack | Server schema in this pack | Inventory result |
|---|---|---|---|
| POST /api/public/request | Forms with data-request demo or question in public/request-demo.html and public/guides/request-source-review.html, submitted as JSON by public/site.js | Field limits and timeout in public/config-manifest.html and public/operations.html. Role and kind enums and payload construction in public/site.js. No separate server schema file is in the site pack. | Only mutating server endpoint in the site slice. Field rules in the table below. |
| POST /api/files, with GET /api/files?ref=... | No client form in the site pack. APPKIT.md names form field file, optional ref like case:id, and a list request with ref. | No file type, size, ref pattern, enum, or unknown-field rule is documented in the site pack. | Not inventoried as a rule set and no rule is invented here. Correction 8 below states what must be documented before a client ships. |
| Browser-local saved items in My Answers, guides index, offline, and try a sample | localStorage and sessionStorage only, with no server call | None, by design. Limits are documented in public/config-manifest.html for My Answers and guides index. | Not a server endpoint. Listed so a local limit is not read as a server rule. |
Field rules for POST /api/public/request
Client-submitted fields are the form fields name, email, org, role, and message, plus client-added fields kind and page, plus the honeypot field website, plus the X-Request-Id header. public/site.js sends the payload as JSON with Content-Type application/json and Accept application/json, reuses the same request identifier on retry with the same field values, and uses a new identifier when field values change. The timeout, attempt, and retry values are documented in Configuration manifest and are not repeated as field rules here.
| Field | Required | Type | Enum or pattern | Length or range | Unknown-field rule |
|---|---|---|---|---|---|
| name | Yes, at least 1 character after trim | String, trimmed | No enum. Single line, with no control character, per correction 3 below. | 1 to 120 characters after trim, matching maxlength 120 in public/request-demo.html | A form element with this name is allowed. Any other form element name is rejected by public/site.js and by the inline validator in public/request-demo.html. |
| Yes, at least 1 character after trim | String, trimmed | Email pattern used in public/site.js and in public/request-demo.html, single line, with no space. No domain allowlist and no case normalization is documented in the pack. | 1 to 254 characters after trim, matching maxlength 254 | As for name. | |
| org, college or system office | Yes, at least 1 character after trim | String, trimmed | No enum. Single line, with no control character, per correction 3 below. | 1 to 200 characters after trim, matching maxlength 200 | As for name. |
| role | Yes, one enum value exactly | String, trimmed, case sensitive | Nine values in public/site.js REQUEST_ROLES: College administrator, System office governance staff, IT staff, Faculty, Student services staff, Help desk staff, Student, Prospective student, Other. The value must also match a select option on that form, per correction 1 below. | No separate length limit documented. The enum is the range. | As for name. A select value outside the enum is rejected. |
| message | Yes, at least 1 character after trim | String, trimmed | No enum. Line breaks in text are allowed. No NUL or other control character, per correction 3 below. | 1 to 4000 characters after trim, matching maxlength 4000 | As for name. |
| kind, client-added | Yes, from data-request on the form | String, case sensitive | Two values: demo, question | Enum only. | Not a form element. A value outside the enum is rejected by public/site.js. |
| page, client-added | Yes, set by public/site.js from location.pathname | String | Path starting with / for the page that holds the form. No allowlist and no length limit is documented in the pack. | None stated in the pack. See correction 5 below. Do not invent a limit in page text. | Not a form element. It is added after validation in public/site.js. |
| website, honeypot | No. It must be empty for a person. | String | No client pattern is documented. public/site.js excludes it from drafts and sends it as a form field in the payload. | None stated in the pack. See correction 5 below. | Skipped by both validators as a honeypot field. See correction 4 below. |
| X-Request-Id header | Yes, on every send and on retry | String | Generated once per payload by ensureRequestId in public/site.js. Reused on retry with the same field values. New value when field values change. | No format or length is documented in the pack. | Header, not a JSON field. A retry must not create a new identifier for the same field values. |
Gaps found and specific corrections
Apply each correction in the named file in the same release as any server schema change. Do not state a corrected value in page text before the code that sets it ships.
- Correction 1, role enum mismatch. public/request-demo.html lists 7 roles in its inline validator, public/site.js lists 9 roles, the request-demo forms offer 7 select options, and the source review form offers 9 select options. Correct the inline validator list to the 9 values in public/site.js, keep the select options as they are on each form, and require both a select option on that form and a value in the 9-value enum in both validators. public/site.js already requires both. The inline validator does not check select options.
- Correction 2, duplicate field names. public/site.js reports an error for a repeated field name. The inline validator in public/request-demo.html silently skips a repeated field name. Correct the inline validator to report the same error, with the field label and the reload wording used in public/site.js, and do not send the request.
- Correction 3, control characters. Neither validator rejects carriage return, line feed, NUL, or other control characters in name, email, org, or role, or NUL or other control characters in message. Correct both validators to reject a single-line field that contains those characters, with a single-line error message, and to reject message text that contains NUL or a control character other than tab, line feed, or carriage return. Keep entries on the page and do not send the request.
- Correction 4, hidden fields and payload keys. Both validators skip hidden, submit, and button elements, so an unknown hidden field is not rejected client-side. public/site.js filters the payload to allowed keys before fetch, so that hidden field is not sent. Correct the server unknown-field rule to apply to JSON keys, add a payload key check before fetch in public/site.js that errors when a key outside name, email, org, role, message, kind, page, and website is present, and document that rule in Configuration manifest.
- Correction 5, undocumented payload fields. Configuration manifest lists name, email, college, and message limits, but does not list role, kind, page, or website. Correct Configuration manifest in the same change that ships the server schema to list role with its 9-value enum, kind with its 2-value enum, page with a stated length limit, and website with a stated empty rule. Do not invent a page length or a website length in page text before that change.
- Correction 6, email pattern and normalization. Both validators use the same email pattern and the same 254 character limit, with no domain allowlist and no case normalization documented. Keep that rule. If the server adds a domain rule or normalization, state it in Configuration manifest in the same change that ships it, and do not state it in page text before that change.
- Correction 7, minimum length. Both validators require at least 1 character after trim for name, email, org, and message, and no other minimum is documented. Keep that rule. Do not invent a higher minimum in page text.
- Correction 8, POST /api/files. No client and no server schema are in the site pack, only the APPKIT.md names file and optional ref like case:id. Do not ship a file upload client in the site slice until the app slice schema states file type, size limit, ref pattern, required status, and unknown-field rule, and add those rules to this inventory in the same change.
Use this inventory with Form field standard above for label, helper, placeholder, and error placement, and with Configuration manifest for timeout, attempt, and retry values. A field that fails a rule in the table above is a validation error on the page, with entries kept on the page, and is not sent as a request.
Before and after examples
Each example in this section shows the pattern as found and the same field changed to the standard. Copy the after form.
Example 1. Required marking
Before, as found on My Answers and both calculators. The asterisk is the only marking and a screen reader user hears only the label.
<label for='ma-title'>Title *</label>
<input id='ma-title' name='title' type='text'>
After, to the standard. The asterisk stays visible and the required state is in text for a screen reader.
<label for='ma-title'>Title <span class='req' aria-hidden='true'>*</span><span class='sr-only'>(required)</span></label>
<input id='ma-title' name='title' type='text' required aria-required='true' aria-describedby='ma-title-help'>
<p id='ma-title-help' class='field-help'>Use the question in short form.</p>
Example 2. Helper text on every field
Before, as found on My Answers. The question field has no helper text, so the person must guess what to put in it.
<label for='ma-question'>Question as you asked it</label>
<textarea id='ma-question' name='question' rows='3'></textarea>
After, to the standard. One helper sentence states what to put in the field and the field points to it.
<label for='ma-question'>Question as you asked it</label>
<textarea id='ma-question' name='question' rows='3' aria-describedby='ma-question-help'></textarea>
<p id='ma-question-help' class='field-help'>Copy the question exactly as you asked it. Leave out personal details.</p>
Example 3. Placeholder use
Before, as found on the first answer defaults form. The placeholder is the only instruction and it disappears as soon as the person types.
<label for='def-college'>College name</label>
<input id='def-college' type='text' placeholder='Type the college name at the top of the app'>
After, to the standard. The instruction moves to helper text. The same rule keeps a format example placeholder on a link field, where the example adds information beyond the label.
<label for='def-college'>College name</label>
<input id='def-college' type='text' aria-describedby='def-college-help'>
<p id='def-college-help' class='field-help'>Use the college name at the top of the app.</p>
<label for='ma-source-link'>Source link</label>
<input id='ma-source-link' type='url' placeholder='https://example.edu/page' aria-describedby='ma-source-link-help'>
<p id='ma-source-link-help' class='field-help'>Paste the address of the source page, starting with https.</p>
Example 4. Error placement
Before, as found on My Answers and both calculators. A status line states the problem and the field that caused it is not marked.
<p id='ma-status' role='status'>Title is required.</p>
After, to the standard. The error sits after the helper text for the field that needs attention, and the form summary receives focus.
<input id='ma-title' name='title' type='text' required aria-required='true' aria-invalid='true' aria-describedby='ma-title-help ma-title-error'>
<p id='ma-title-help' class='field-help'>Use the question in short form.</p>
<p id='ma-title-error' class='field-error'>Title is required.</p>
<p class='form-status' role='alert' tabindex='-1'>1 field needs attention. Title is required.</p>
Example 5. Label wording for the same value
Before, as found across the saved answers and saved items forms. The same value is called title in one form and question or answer title in the other.
<label for='ma-title'>Title</label>
<label for='pc-title'>Question or answer title</label>
After, to the standard. Both forms use one wording per value, and the helper text states the detail that differs between the forms.
<label for='ma-title'>Answer title</label>
<input id='ma-title' aria-describedby='ma-title-help'>
<p id='ma-title-help' class='field-help'>Use the question in short form, such as add deadline for spring term.</p>
<label for='pc-title'>Answer title</label>
<input id='pc-title' aria-describedby='pc-title-help'>
<p id='pc-title-help' class='field-help'>Write the question or a short title for the answer you want to keep.</p>
Example 6. Grouping and primary submit-button treatment
Before, as found on a flat calculator block. Fields for two periods sit in one flat group, and Download and Clear use the same button style as the action that moves the task forward.
<div class='form-card'>
<label for='cur-questions'>Questions asked</label>
<input id='cur-questions' type='number'>
<label for='prev-questions'>Questions asked</label>
<input id='prev-questions' type='number'>
<button class='button' id='trend-csv'>Download trend as CSV</button>
<button class='button' id='trend-clear'>Clear counts</button>
</div>
After, to the standard. Each period sits in one fieldset with one legend, and the block keeps no primary submit because nothing entered is sent. Download and Clear stay as secondary buttons with type button.
<fieldset>
<legend>Current period counts</legend>
<div class='field'>
<label for='cur-questions'>Questions asked <span class='req' aria-hidden='true'>*</span><span class='sr-only'>(required)</span></label>
<input id='cur-questions' type='number' required aria-required='true' aria-describedby='cur-questions-help'>
<p id='cur-questions-help' class='field-help'>Copy the count from Reports for the current period.</p>
</div>
</fieldset>
<fieldset>
<legend>Previous period counts</legend>
<div class='field'>
<label for='prev-questions'>Questions asked <span class='req' aria-hidden='true'>*</span><span class='sr-only'>(required)</span></label>
<input id='prev-questions' type='number' required aria-required='true' aria-describedby='prev-questions-help'>
<p id='prev-questions-help' class='field-help'>Copy the count from Reports for the previous period.</p>
</div>
</fieldset>
<div class='btns'>
<button class='button' type='button' id='trend-csv'>Download trend as CSV</button>
<button class='button' type='button' id='trend-clear'>Clear counts</button>
</div>
On a mutating form, the same grouping rule applies and the one primary submit sits last after all fieldsets, as the demo and question forms on the request demo page already show with Send request and Send question.
Checks before you ship a form change
Run each check on a phone and on a desktop with keyboard and screen reader before you publish.
- Each label names the value in the same wording on every form, and no label repeats in its helper text
- Each required field shows an asterisk plus screen reader text, and each optional field shows neither
- Each field has one helper paragraph in the order label, field, helper text, error text, linked with aria-describedby
- Each field sits in one fieldset with one legend per group, and calculator blocks use one fieldset per period or scope group
- Each mutating form has exactly one primary submit button placed last with a verb plus object label, and each calculator, filter, search, or checker block has no primary submit and names its one primary action where it has one
- Each placeholder shows a format example only, and no field relies on a placeholder for its instruction
- Each error sits after the helper text for its field, and the form summary with role alert receives focus
- Field text is at least 16 pixels, each control is at least 44 pixels high, and focus stays visible
- Each field in the server-side validation inventory above passes its required, type, enum, length, and unknown-field rule, and a field that fails a rule is not sent
- Each form in the inventory above is listed with its screen name and primary button label, and a signed-in form that is built is added to that inventory in the same change
Public forms to bring to this standard first are the demo and question forms on the request demo page, the saved answers form on My Answers, the saved items form on the guides index, the calculators on the reports page and the answer quality metrics guide, and the defaults form on the first answer guide. Signed in create, edit, and settings forms follow the same standard when those screens are built, with the same label wording for the same value.
Next guide
Keep empty states consistent wherever a list can be empty.