Dynamic fields: forms whose fields depend on other fields. Which answers are allowed to reshape the form, where a dependent field appears and how it arrives, what happens to a value whose rule changes underneath it, and what a hidden branch keeps, shows and submits.
Two or three governing answers at the top decide a conditional form's shape, set apart from the fields they govern. Everything below them is a leaf conditional, which only reveals or swaps a field where it stands. Thousands of permutations reduce to a handful of shapes, and the user sees one shape change at a time.
Forms with nested conditions and cross-field rules reach thousands of permutations quickly. Kessick's ship-to location form has two governing answers: how the location receives (our trucks, a common carrier, customer pickup) and, for the two that deliver, whether it has one dock or several. That makes five shapes. Under them sit about a dozen leaf conditions: liftgate needed, appointment required, hazmat accepted, a tax exemption. Each leaf adds or swaps one field in place, and together they multiply into roughly 3,000 permutations. Permutations are the product's problem; shapes are the user's. If any answer anywhere could reshape the form anywhere, nobody could predict what the next click does. If only the answers at the top can, the user learns the rule after one try: up there decides the form, down here decides a field.
| Governing answer | Leaf conditional | |
|---|---|---|
| Decides | Which sections and fields exist: the form's shape | One field or one row, under itself |
| How many | Two or three per form; past that, split the form | As many as the content needs |
| Where | At the top, set apart, before anything it governs | Directly above the field it reveals or swaps |
| Control | A segmented control or radios, every option visible | A checkbox, a radio, a select |
| Changing it | Asks first, naming what is kept and cleared (section XII) | Reveals or hides at once; values kept for the session |
Set the governing answers apart, and keep them few. They go first, in a group of their own with a hairline around it, the one place on a form where a box earns its ink: it says "these are different" (Forms I §VI otherwise refuses boxes). They use a segmented control or radios, never a select, so every shape on offer is visible before the user picks. Past three governing answers, the form is several forms, and the first answer should choose between them. A leaf changes only what is under it. Liftgate needed opens Liftgate fee and nothing else. A leaf that reaches into another section is a governing answer in disguise; promote it to the top. Changing a governing answer is a bigger act than ticking a leaf, and it asks first, in the honesty dialog of Forms I §X (section XII).
A dependent field is revealed directly below the control that governs it; that is the default. In a dense grid it swaps in the same slot, or a whole conditional row appears under its governing row. A reserved empty slot is OK in a small parameter panel and nowhere else. Appending at the end, popping in, fading over, appearing above or opening a dialog are Wrong.
| How | Grade | When |
|---|---|---|
| Reveal below | Right | The default: a field or a small group under its control |
| Swap in the slot | Right | The same question asked another way: EIN or SSN, ZIP or postal code |
| Conditional row | Right | A dense grid: the dependent fields as a whole row under the governing row |
| Reserved slot | OK / Avoid | One or two fields in a parameter panel; never a section |
| Append at the end | Wrong | Never: the consequence is far from its cause |
| Pop in, fade over | Wrong | Never: no motion loses the place, no height overlaps |
| Above the control | Wrong | Never: it moves the focused field |
| A dialog or drawer | Wrong | Only when the dependent set is a record of its own, which is nesting |
The reveal is the default because cause and consequence touch. The user's eye is on the control they just changed; the field it asked for appears directly under it, indented 22 to the radio's label so it reads as belonging to that answer. The swap suits a question asked two ways: the slot stays put and its label, format and helper change, which is why it is the better choice in a dense grid or a narrow column, where a reveal would push a whole column of fields. The conditional row is the grid's reveal: a hazmat answer opens UN number, hazard class and packing group as a row of their own under its row, so no column reflows around one field (Forms I §V). A reserved slot, an empty disabled box waiting for its condition, keeps a small parameter panel still; a section of them is noise, every empty box a question the form isn't asking.
The Wrong placements fail on the same axis, distance from the cause. Appending to an "Additional details" group at the end puts the consequence where the user isn't looking, and they may submit without ever seeing it. A field that pops in with no motion makes the content below it jump, and the user loses their place; one that fades in over its slot without the height changing lands on the next field. A field inserted above its control is the worst of them: everything below moves, including the field with focus, under the user's cursor (section III). A dialog hides two fields behind a click and adds a second Save; it is right only when the dependent set is a record of its own, a new contact with a name, email and phone, which is nesting, not a condition.
Dependent fields appear below their governing control, never above it, and never move the field that has focus. When a value the user is typing triggers a field, the field appears after the one being typed in.
Below, because reading and the cursor both run downward. The user's attention is on the control, and the next thing they read is what is under it; a field revealed there is found without looking. Above, the new content pushes the control and everything after it down, and the field the user is typing in moves under their cursor: try it, and at this width the ZIP field drops 60, the notice and its gap, as the fifth digit lands. A click aimed at it a moment later hits the notice. The rule has no exceptions: a dependent field never appears above its governing control, and nothing appears above the field with focus. A notice tied to a value (an address outside the delivery area, a quantity over the pallet limit) follows the same rule; it is a dependent element like any other, and it sits under the field whose value caused it, in the place where Forms I §VIII puts a field's message.
A dependent field arrives at base 200 on the enter curve: the height opens from 0 and the content fades in behind it. It leaves one step faster, fast 150 on the exit curve. Under reduced motion the height changes at once and the fade stays.
The height moves because the push must be seen. The fields below a reveal have to make room, and a user who sees them move knows what changed; a jump hides it. Motion I §V allows this one layout animation and says how: animate grid-template-rows from 0fr to 1fr, which runs the curve over the true height, never a max-height guess. The content's opacity runs with it, so the fields appear as the space opens instead of sliding in already drawn. The durations come from Motion I §II: an arrival is base 200, and a removal is one step faster, fast 150, because the user has already stopped looking at what leaves (§IV). Reduced motion keeps the transition and drops the travel (Motion I §X): the rows change at once and the fields still fade in over 200, so the change is never silent.
An inapplicable field is hidden by default. Disabled is for a field that exists in every shape but doesn't apply right now, and only when there are few of them; read-only is for a field that applies and can't be changed. A hidden or disabled field keeps its value for the session, shows none, and is never submitted or validated.
| Hidden | Disabled | Read-only | |
|---|---|---|---|
| For | A field that doesn't exist in this shape: the default | A field in every shape that doesn't apply now; a few at most | A field that applies and is fixed or derived |
| Its value | Kept for the session | Kept for the session; the box empty | Shown |
| Submitted | Never | Never | Yes |
| Validated | Never | Never | By the server only |
Hide by default; disable only where the field's presence is information. Inputs II §IX drew the line between the two achromatic states: read-only is information to read and copy, disabled is a control that exists and can't be used now. On a conditional form, disabled earns its place only when the field belongs to every shape and its absence would make the form look incomplete, the appointment window on a ship-to that may or may not need one, and only for a few such fields; a column of grey boxes is a form the user must read twice. Everything else that doesn't apply is hidden. A disabled box shows no value. A value in a disabled field reads as something that will be submitted, and it won't be; the value waits in the session and returns when the field is enabled (section VII). Neither is submitted or validated. What the form sends and checks is the visible, applicable set, and nothing else (section XI).
When a governing change makes a typed value invalid or an optional field required, the value stays. The field is marked invalid, with a message that names the new reason; the required mark appears; the summary lists it. The one exception is a select whose chosen option no longer exists: it empties to its placeholder and says why in its helper.
Never silently clear a typed value. The user typed 96 for a reason, and the new limit may be the thing that's wrong, not the value; clearing it takes away both the work and the evidence. So the value stays and is marked invalid, with a message that names the new rule and the answer that brought it ("Common carrier takes pallets up to 84 in"), as Forms I §VIII asks of every message. A field that became required gets its mark at once ("(required)" here, this form marking the rarer kind, as Forms I §VII has it) and its message, and the summary at the top lists every field the change touched. Leaving them looking valid is the other Wrong: the form knows, and it waits until submit to say so. The exception is the select whose option no longer exists. Its value is an option, not text the user wrote; when the option is gone from the list it can't stay selected, so the select empties to its placeholder and the helper says what was there and why it went ("Cleared: White glove isn't offered by common carrier"). Select I §V already refuses a placeholder that smuggles in a value.
A disabled field that enables under a condition shows an empty box while disabled and gets its value back when enabled; the value waits in the session between the two. A disabled box never shows a stale value.
Empty while disabled, restored when enabled. A disabled box with "8:00 – 10:00 am" in it says the window is set and will be sent; it won't be, because a disabled field is never submitted (section V), so the box lies. Emptying it on disable and restoring it on enable tells the truth both ways and costs the user nothing: they never retype a value the form knew. The values live in the session, not in the record and not in a draft, unless the product keeps branches on purpose (section XIII). This is the pattern for the few fields that exist in every shape; for anything else, hide and reveal (section II) is quieter. The helper says when the fields apply, so the condition is readable before the user looks for it, as Forms I §I asks of a toggle's helper.
A select whose options come from another answer (state, then county; category, then subcategory) reloads its options when that answer changes, says so while they load, and empties a selection that isn't in the new list, saying what was cleared. Its value is the option, never its label.
The value is the option, never its label. Hamilton County, Ohio and Hamilton County, Indiana share a name and nothing else: a different tax rate, a different jurisdiction. A select that keeps "Hamilton" across the state change because the label matches has kept the wrong value and shows it as right. So a dependent select compares option identities, and when the old one isn't in the new list it empties to its placeholder with the reason in its helper, the exception from section VI. While the options load, it says so in the helper, "Loading Indiana's counties…", and the trigger keeps its size; Select I §IX calls a spinner row honest and a trigger that silently refuses to open broken, and long lists that load as you type are Select II §VII's. When the parent is empty, the child shows its placeholder with the dependency in its helper ("Choose a state first"), not a disabled box with no reason.
A repeating group (an order's line items, a vendor's contacts) starts with one empty row, adds the next with a button under the last row, removes a row in place with Undo, and states its limit before it is reached.
Start with one empty row. An empty list with an "Add line" button asks the user to do something before they can do the thing they came for; one empty row is already the answer to "what goes here?". Add goes under the last row, where the next row will appear, and focus moves into the new row's first field, so the keyboard user keeps typing. Remove is in the row and doesn't ask: a line is cheap to recreate and removal is reversible, so the row is replaced in place by "Line 2 removed · Undo", which holds its place until the next action, the undo-before-confirm of Forms I §XII. The last row can't be removed, only cleared. The limit is said before it is reached ("3 of 5 lines"), and at the limit Add stays visible with the reason beside it, never a disabled button with none. Each row is a small grid on the form's columns, its numbers right-aligned, with a derived line total (section X) and the running total under the group (Forms I §X). Reordering rows by drag belongs to Drag, Resize & Reorder (planned).
A value the form calculates is shown, not edited: read-only text, right-aligned, updating as its inputs change. Where the user may override it, the override is a deliberate act that says so and offers the way back to the calculated value.
Derived values are text, not fields. A line total in an input box invites typing a total the form will recalculate over, so it is read-only text in the field's slot, right-aligned on the same edge as the numbers above it, and it changes as the cases change, the running result of Forms I §V. An override is a mode, said in the helper. The price per case comes from the list, so it starts calculated, with its box quiet; Override makes it a field, and from then on the helper says "Overridden · list $51.38 · Reset to list", so the user and whoever approves the order can see that this price was set by hand. A calculated field that silently accepts a typed value and then recalculates over it on the next change is the Wrong: the user's number disappears the moment they touch the quantity.
Validation runs on the visible, applicable set only. A cross-field rule's message names the governing answer that made it apply, and the summary on a conditional form lists only what the user can see and fix.
Check what applies, and say why it applies. A hidden field is never validated (section V), so a summary that counts "Truck route is required" on a common-carrier location is asking for a field the user can't see and shouldn't fill. A field that is required only because of another answer says so: "Freight class is required for common carrier" tells the user the rule and the way out of it, where "Freight class is required" leaves them wondering why a field that was optional a moment ago isn't now. A cross-field rule names both sides in words the user knows ("With a liftgate, the fee is required"). The rest is Forms I §VIII: format on blur, completeness on submit, the message under its field in the UI voice, the summary linking to each one, the label neutral (Inputs II §XII). A cross-field check runs when the second of its fields is left, never while either is being typed.
Changing a governing answer once its branch holds answers asks first: it says what is kept, what is cleared from the record, and that switching back this session restores it. Keep the current answer is the focused, default way out. An autosaving form saves after the answer, never before it.
A governing answer reshapes the form, so changing it asks. It is the same dialog Forms I §X gave the stepper that flags, said on one page: the title is the change ("Change to our trucks?"); the body lists what is kept (dock hours, the receiving contact), what is cleared from the record (carrier, freight class), and that switching back this session brings them back; Keep common carrier has focus, so Enter and Escape both mean "no". A governing answer whose branch is still empty changes at once with nothing to ask, as Modal I §IX lets a clean surface close. Autosave waits for the answer. A document or a draft that saved the moment the radio moved would have written the new shape, and cleared the old branch from the record, before the user had agreed to anything; it saves after Change, and Keep saves nothing because nothing changed.
Keep each branch's values for the session, so switching back restores them; the first visit to a branch shows its defaults. The record and the draft store only the chosen branch, unless the product deliberately keeps branches, in which case the draft stores them and says nothing about it.
Switching branches is exploring, not deciding. A user comparing two ways a location could receive should be able to fill one, look at the other and come back without retyping. So each branch keeps its values for the session, the first visit to a branch shows its defaults, not a blank, and only the chosen branch reaches the record. The same holds wherever a choice opens its own set of options:
| Domain | The governing choice | Its branch | Kept on switching back |
|---|---|---|---|
| Lunch order | Cheeseburger or chicken sandwich | Doneness, cheese; bun, sauce | The burger as you built it |
| Airline booking | Cabin class | Seat, meal, bags | The seat you chose in economy |
| Car configurator | Trim level | Wheels, interior, packages | The options on the trim you left |
| Ad campaign | Objective | Audience, duration, price targets | Each objective's targets |
| Kessick ship-to | Receives by | Route; carrier and class; pickup contact | Each branch's fields |
The record and the draft save what applies. A ship-to saved as common carrier stores the carrier and freight class and nothing of the truck route; the shadow values of the branches not chosen live in the session and end with it. A product that wants per-branch memory across sessions, an ad platform that keeps every objective's targets while a campaign is drafted, stores the branches in the draft (Forms I §IX) and says nothing about it: the user sees their values come back, which is the whole point, and never sees a hidden branch in a review or a record (section XIV). Autosave, as section XII has it, follows the governing answer, never precedes it.
A review and a saved record show what applied, and nothing from a branch that wasn't chosen. A hidden value shown in a review reads as something that was submitted.
What the user sees after saving is what was saved. The review before a commit and the record after it list the governing answers, the chosen branch and the leaves that applied, in the form's order; a hidden branch's values are not "—" rows and not greyed rows, they are absent. A truck route on a common-carrier location is worse than noise: the next person to read it acts on it. If the session still holds a shadow value, it stays in the session.
On a phone a reveal pushes the content below it down, which is fine; the swap is better than the reveal wherever the column is narrow, because it moves nothing. The indent of a dependent group shrinks to the radio's own inset. In dark mode the rules of Forms I's dark section stand unchanged.
A reveal on a phone is still right; a swap is better. In a 343 column every dependent field takes the full width, so a reveal of two fields pushes the rest of the screen down by two rows; the user sees it happen, which is acceptable, and the governing control stays where their thumb is. Where the same question is asked two ways, the swap moves nothing at all, which is why a narrow column prefers it. The reveal's indent stays at 22, the radio's own inset, so the dependent fields still read as belonging to their answer. A dialog for the dependent fields, Wrong on a desktop, is worse on a phone, where it becomes a full-screen sheet (Modal I §XIII). Dark mode adds nothing new: the governing panel's hairline is white at .14, the fields' edges white at .40, the error the light ink at 2px, as Forms I §XV measured them; the indent, not a tint, marks a dependent group, so it reads the same in both modes.
Build each conditional form in this order; each step assumes the ones before it and everything in Forms I's checklist.
Steps one, two, six and thirteen are the judgement; the rest are contracts. The audit: list every condition on the form and mark which answers reshape it; if more than three do, split it. Change each governing answer with its branch filled and read what the form says; type into the field below a leaf and see whether anything above it moves; switch branches and back and count what you retype; submit and read the record for a value that shouldn't be there.
The boundaries, stated once. Forms I owns the form itself: its kind, column, labels, widths, grid, validation, saving and submit; this part adds only what changes when fields depend on fields. Motion I owns the curves and the accordion; Select I and Select II own the select's states and long lists; Modal I owns the dialog that asks. Loading I takes the wait while options load; Drag, Resize & Reorder (planned) takes reordering rows; Copy & Tone (planned) takes the words of the messages. What every rule here comes back to: the user should be able to predict what the next click will change.
Part II of Forms.
A few answers decide the shape; every other answer changes only what is under it.