Two set-up jobs, done in order. First you build the selection targets — the demographic categories and how many of each you want — without thinking about the registration form at all. Then you build the registration fields, and make sure that between them they can supply the data every target needs.
Targets and registration fields are independent structures. A target does not name a field, and a field does not name a target. They meet in one place only: the check that asks “can every target get its value from the data this form collects?” — either from a field whose name and options match the target, or from a derived field that computes it.
That is why targets come first. You agree the categories with the client in target-shaped language, and only afterwards work out what to ask people on the form.
flowchart LR
classDef pre fill:#d7ccc8,stroke:#5d4037,color:#0b0c0c
classDef target fill:#fad7a8,stroke:#b58840,color:#0b0c0c
classDef field fill:#c8e6c9,stroke:#2e7d32,color:#0b0c0c
classDef done fill:#e1bee7,stroke:#6a1b9a,color:#0b0c0c
P(["Number-to-select<br/>already agreed"]):::pre
subgraph BOX1["Box 1 - set up and manage targets"]
direction TB
T1["Add a target<br/>e.g. Gender"]:::target
T2["Add its target values<br/>Male, Female, Non-binary"]:::target
T3["Now or later: percentages,<br/>min and max, source URL,<br/>comments"]:::target
T1 --> T2 --> T3
end
subgraph BOX2["Box 2 - set up registration fields"]
direction TB
F1["Add sections"]:::field
F2["Add fields to the sections"]:::field
F3["Confirm every target can get<br/>its data - directly, or from<br/>a derived field"]:::field
F1 --> F2 --> F3
end
G["Generate the<br/>registration form"]:::done
P --> BOX1 --> BOX2 --> G
click T1 "#flow-targets" "Flow 1 - targets"
click T2 "#flow-targets" "Flow 1 - targets"
click T3 "#flow-targets" "Flow 1 - targets"
click F1 "#flow-fields" "Flow 2 - registration fields"
click F2 "#flow-fields" "Flow 2 - registration fields"
click F3 "#coverage-detail" "The coverage check"
Click a box to jump to the flow that expands it. Box 2 branches a long way, so it is broken into four further flow charts below.
The core of this is two steps: add a target, add its values. Everything else is optional and can happen at set-up time or months later as ordinary management, so it is drawn as a fan-out from the targets list you keep coming back to.
flowchart LR
classDef pre fill:#d7ccc8,stroke:#5d4037,color:#0b0c0c
classDef hub fill:#cce2f7,stroke:#1d70b8,color:#0b0c0c
classDef target fill:#fad7a8,stroke:#b58840,color:#0b0c0c
classDef decide fill:#f8bbd0,stroke:#ad1457,color:#0b0c0c
classDef form fill:#f3f2f1,stroke:#505a5f,color:#0b0c0c
classDef check fill:#fff7d6,stroke:#b58840,color:#0b0c0c
S(["Number-to-select is set"]):::pre
A["Add a target<br/>e.g. Gender"]:::target
V["Add target values<br/>e.g. Male, Female, Non-binary"]:::target
HUB(["Targets list"]):::hub
S --> A --> V --> HUB
HUB -->|"another target"| A
HUB -->|"another value"| V
P["Set or edit the percentage<br/>for each target value"]:::target
CALC["Auto-calculates min and max:<br/>min = floor(percentage × number-to-select)<br/>max = ceil(percentage × number-to-select)"]:::form
SUM{"Do the percentages for<br/>this target add up to<br/>close to 100.0?"}:::decide
WARN["Show a warning<br/>(does not block you)"]:::check
HUB --> P --> CALC --> SUM
SUM -->|"no"| WARN --> HUB
SUM -->|"yes"| HUB
MM["Directly set min and max<br/>on a target value"]:::target
BREAK["Breaks the auto-calculate link<br/>for that value: later changes to the<br/>percentage or to number-to-select<br/>no longer move its min and max"]:::form
VC["Add or edit a comment on the<br/>target value - usually why the<br/>min and max were set by hand"]:::target
HUB --> MM --> BREAK --> VC --> HUB
URL["Add a source URL to the target<br/>where the percentages came from"]:::target
TC["Add or edit a comment on the target<br/>usually about the source"]:::target
HUB --> URL --> HUB
HUB --> TC --> HUB
DV["Delete a target value"]:::target
DT["Delete a target<br/>and all of its values, comments and URL"]:::target
HUB --> DV --> HUB
HUB --> DT --> HUB
CHK["Check the targets"]:::check
C1["against number-to-select"]:::form
C2["against the registration fields<br/>if any exist yet"]:::form
C3["against the pool of respondents<br/>if any exist yet"]:::form
HUB --> CHK
CHK --> C1
CHK --> C2
CHK --> C3
click A "#add-target-detail" "Adding a target"
click V "#add-target-detail" "Adding target values"
click P "#percent-detail" "Percentages and the auto-calculate link"
click CALC "#percent-detail" "Percentages and the auto-calculate link"
click SUM "#percent-detail" "Percentages and the auto-calculate link"
click WARN "#percent-detail" "Percentages and the auto-calculate link"
click MM "#minmax-detail" "Setting min and max by hand"
click BREAK "#minmax-detail" "Setting min and max by hand"
click VC "#minmax-detail" "Setting min and max by hand"
click URL "#provenance-detail" "Recording where the numbers came from"
click TC "#provenance-detail" "Recording where the numbers came from"
click DV "#delete-detail" "Deleting targets and values"
click DT "#delete-detail" "Deleting targets and values"
click CHK "#check-targets-detail" "The check targets button"
click C1 "#check-targets-detail" "The check targets button"
click C2 "#check-targets-detail" "The check targets button"
click C3 "#check-targets-detail" "The check targets button"
Click any box to jump to its details.
A target is a category you want to stratify on: gender, age_bracket, region. A target value is one of the buckets inside it: Male, Female, Non-binary.
This is the whole minimum. A target with values, and nothing else filled in, is a valid target — the percentages, min/max, URL and comments can all wait.
For each target value you enter the percentage of the assembly that should fall in that bucket. From the percentage and the already-agreed number-to-select, the min and max are calculated automatically:
min = floor(percentage × number-to-select)max = ceil(percentage × number-to-select)Because both are derived, changing the percentage or changing the number-to-select will move the min and max for every value that still has its auto-calculate link intact.
The percentages for a single target should add up to about 100.0. If they don't, a warning is shown — but it is only a warning. Rounding in published statistics means the total is often 99.9 or 100.1, and there are legitimate reasons for a bigger gap, so this never blocks you.
You can type a min and max directly onto a target value instead of letting them be calculated. Doing so permanently breaks the auto-calculate link for that value: from then on, editing the percentage or the number-to-select will not touch its min and max.
The link is per target value, not per target — one hand-set value in a target does not detach the others.
This is exactly why target values carry their own comment field. A hand-set min/max is a decision someone made for a reason, and six weeks later nobody remembers the reason. Write it down next to the number.
The target itself carries two pieces of provenance:
A single button that runs the sanity checks that are possible at that moment. Which ones can run depends on what else exists yet:
Because targets are set up before either fields or respondents exist, the first run of this button will usually only be able to do the first check. That's expected — it is a button you come back to.
Fields live in named sections, and sections are what the respondent sees as headed groups on the form. Most of this flow is ordinary list management; the three big entry points — add a field, add common fields, create fields from a target — each get their own chart below.
flowchart LR
classDef pre fill:#d7ccc8,stroke:#5d4037,color:#0b0c0c
classDef hub fill:#cce2f7,stroke:#1d70b8,color:#0b0c0c
classDef field fill:#c8e6c9,stroke:#2e7d32,color:#0b0c0c
classDef decide fill:#f8bbd0,stroke:#ad1457,color:#0b0c0c
classDef check fill:#fff7d6,stroke:#b58840,color:#0b0c0c
classDef done fill:#e1bee7,stroke:#6a1b9a,color:#0b0c0c
S(["Targets exist"]):::pre
SEC["Add a section<br/>just give it a name"]:::field
HUB(["Sections and their fields"]):::hub
S --> SEC --> HUB
HUB -->|"another section"| SEC
RS["Reorder sections"]:::field
DS["Delete a section"]:::field
HUB --> RS --> HUB
HUB --> DS --> HUB
NF["Add a new field<br/>button sits inside each section,<br/>so the section is already known"]:::field
CF["Add common fields"]:::field
TF["Create field(s) from target(s)"]:::field
CP["Copy fields from another assembly"]:::field
HUB --> NF -.->|"flow 3"| HUB
HUB --> CF -.->|"flow 5"| HUB
HUB --> TF -.->|"flow 6"| HUB
HUB --> CP --> HUB
MV["Move a field to another section"]:::field
RF["Reorder fields within a section"]:::field
HUB --> MV --> HUB
HUB --> RF --> HUB
CHK{"Can every target get its<br/>data from these fields?"}:::check
MISS["Warning: target X has no source -<br/>no matching field and no derived field"]:::check
GEN["Generate the registration form<br/>it becomes the live web page"]:::done
HUB --> CHK
CHK -->|"no"| MISS --> HUB
CHK -->|"yes"| GEN
click SEC "#sections-detail" "Sections"
click RS "#sections-detail" "Sections"
click DS "#sections-detail" "Sections"
click NF "#flow-addfield" "Flow 3 - add a new field"
click CF "#flow-common" "Flow 5 - add common fields"
click TF "#flow-fromtarget" "Flow 6 - create fields from a target"
click CP "#copy-detail" "Copying fields from another assembly"
click MV "#arrange-detail" "Moving and reordering fields"
click RF "#arrange-detail" "Moving and reordering fields"
click CHK "#coverage-detail" "The coverage check"
click MISS "#coverage-detail" "The coverage check"
click GEN "#generate-detail" "Generating the form"
Dotted arrows lead to a flow chart of their own, further down the page.
A section has a name and nothing else. It groups fields on the registration page and gives the respondent a heading — Eligibility, Contact details, About you, Consent are the usual four.
Sections can be reordered and deleted. There is an unresolved question about what deleting a section does to the fields inside it — see open questions.
Two separate operations: reordering fields within a section, and moving a field between sections. Neither changes the field itself — this is purely about how the form reads to the person filling it in.
Assemblies repeat. Rather than rebuild a near-identical set of sections and fields, copy them from an assembly you have already run and edit the differences.
Note that a copied derived field carries assumptions with it: an age-brackets field brings its boundaries, a postcode mapping brings its uploaded CSV. Those may not match this assembly's targets, so the coverage check matters more after a copy, not less.
This is the single point where the two independent structures are compared. For each target, it asks whether the registration fields can produce a value for it. There are exactly two ways they can:
gender field offering Male / Female / Non-binary satisfies a gender target with those three values.
age_bracket; postcode becomes region.
If neither exists for some target, the check reports it. Whether this is a button you press or something that runs automatically on every save is still open — the diagram draws it as a gate, which is true either way.
Once the fields are set, the registration form can be generated and served as the public web page. Derived fields never appear on it — they are computed after submission, from the fields that do.
The button lives inside a section, so which section you are adding to is never asked. Everything after that hangs off the field type: pick the type, and you get that type's form.
flowchart LR
classDef hub fill:#cce2f7,stroke:#1d70b8,color:#0b0c0c
classDef field fill:#c8e6c9,stroke:#2e7d32,color:#0b0c0c
classDef decide fill:#f8bbd0,stroke:#ad1457,color:#0b0c0c
classDef form fill:#f3f2f1,stroke:#505a5f,color:#0b0c0c
classDef done fill:#e1bee7,stroke:#6a1b9a,color:#0b0c0c
B(["Add field, inside a section"]):::hub
T{"Choose the field type"}:::decide
B --> T
CB["Checkbox"]:::field
CH["Choice of options"]:::field
TX["Text"]:::field
NU["Text (numeric)"]:::field
DA["Date"]:::field
CA["Calculated from another field"]:::field
T --> CB
T --> CH
T --> TX
T --> NU
T --> DA
T --> CA
CBF["Name<br/>Question text<br/>Help text (optional)<br/>Must the respondent tick it?"]:::form
CHF["Name<br/>Question text<br/>Help text (optional)<br/>Text for each option<br/>Help text per option (optional)<br/>Form type: auto / radio buttons / dropdown"]:::form
TXF["Name<br/>Question text<br/>Help text (optional)"]:::form
NUF["Name<br/>Question text<br/>Help text (optional)<br/>Minimum (optional)<br/>Maximum (optional)"]:::form
DAF["Name<br/>Question text<br/>Help text (optional)<br/>Full date or year only<br/>Minimum (default 1900-01-01)<br/>Maximum (default start of this year)"]:::form
CAF["Its own multi-step form<br/>see flow 4"]:::form
CB --> CBF
CH --> CHF
TX --> TXF
NU --> NUF
DA --> DAF
CA --> CAF
SAVE["Save - the field appears<br/>in that section"]:::done
CBF --> SAVE
CHF --> SAVE
TXF --> SAVE
NUF --> SAVE
DAF --> SAVE
CAF -.->|"flow 4"| SAVE
click CB "#checkbox-detail" "Checkbox fields"
click CBF "#checkbox-detail" "Checkbox fields"
click CH "#choice-detail" "Choice of options"
click CHF "#choice-detail" "Choice of options"
click NU "#numeric-detail" "Numeric text"
click NUF "#numeric-detail" "Numeric text"
click DA "#date-detail" "Date fields"
click DAF "#date-detail" "Date fields"
click CA "#flow-calc" "Flow 4 - calculated fields"
click CAF "#flow-calc" "Flow 4 - calculated fields"
Every other field type is required on the registration form. A checkbox is the one type where you choose: must the respondent tick it to submit, or is ticking it genuinely their choice?
can_attend, eligible, consent. These gate submission.stay_on_db. Ticked or not, the form submits.Each option has its own text and, optionally, its own help text. The form type controls how it renders:
This is also the type that a map-more-to-fewer derived field reads from, and the type an exact copy from a target produces.
A text field constrained to numbers, with an optional minimum and maximum. Both are optional — leave them blank for an unbounded number.
Used mainly for date of birth. You choose whether to ask for a full date or just a year, which matters: year-only is less intrusive to ask for, but gives an age that can be a year out.
The minimum defaults to 1900-01-01 and the maximum to the start of the current year, which between them reject the obvious typos.
A date field is the usual input for an age-ranges derived field.
A calculated field never appears on the registration page. It exists to turn what you did ask into what the target needs, and it is computed when someone registers.
flowchart TD
classDef hub fill:#cce2f7,stroke:#1d70b8,color:#0b0c0c
classDef field fill:#c8e6c9,stroke:#2e7d32,color:#0b0c0c
classDef decide fill:#f8bbd0,stroke:#ad1457,color:#0b0c0c
classDef form fill:#f3f2f1,stroke:#505a5f,color:#0b0c0c
classDef done fill:#e1bee7,stroke:#6a1b9a,color:#0b0c0c
S(["Field type: calculated from another field<br/>never shown on the registration page"]):::hub
N["Name - pick from the list of target names.<br/>Normally it should match a target name."]:::form
T{"Which calculation?"}:::decide
S --> N --> T
AG["Age ranges"]:::field
MP["Map more options to fewer"]:::field
PC["Map postcode to value"]:::field
T --> AG
T --> MP
T --> PC
AGF["Minimum age (default 16)<br/>Age boundaries, comma separated (default 30,45,60)<br/>Maximum age (default 100)<br/>Date to calculate age on (default today)"]:::form
AGB["Button: work out the minimum age and the<br/>boundaries from the target with the matching name"]:::form
AG --> AGF
AGB -.->|"fills in"| AGF
MPO["Text for each option<br/>button: copy the options from the matching target"]:::form
MPI["Field to map from - choose one of the<br/>fields of type 'choice of options'"]:::form
MPM["One dropdown per registration option;<br/>its choices are the target values.<br/>Every one has to be filled in."]:::form
MP --> MPO --> MPI --> MPM
PCO["Text for each option<br/>button: copy the options from the matching target"]:::form
PCI["Field to use as input<br/>default: postcode"]:::form
PCU["Upload a CSV mapping file:<br/>column 1 is the postcode, column 2 is the value.<br/>Can be thousands of rows."]:::form
PC --> PCO --> PCI --> PCU
SAVE["Save"]:::done
AGF --> SAVE
MPM --> SAVE
PCU --> SAVE
click AG "#agerange-detail" "Age ranges"
click AGF "#agerange-detail" "Age ranges"
click AGB "#agerange-detail" "Age ranges"
click MP "#mapfewer-detail" "Map more options to fewer"
click MPO "#mapfewer-detail" "Map more options to fewer"
click MPI "#mapfewer-detail" "Map more options to fewer"
click MPM "#mapfewer-detail" "Map more options to fewer"
click PC "#postcode-detail" "Map postcode to value"
click PCO "#postcode-detail" "Map postcode to value"
click PCI "#postcode-detail" "Map postcode to value"
click PCU "#postcode-detail" "Map postcode to value"
click N "#derived-detail" "Why derived fields exist"
Because the best question to ask a respondent is often not the shape you want to stratify on. Three recurring cases:
age_bracket (16–29, 30–44, …) but asking someone to self-select a bracket invites error; asking for date of birth does not.
region target with values North / South / East / West / Central London means nothing to most respondents. They know their address. You know which postcodes fall in which region.
In all three cases you set up the target first, in target language, and only later work out which real question can feed it.
Date-of-birth fields go on the registration form. When someone registers, the system calculates their age and drops them into a bucket.
The bucket boundaries come from four numbers:
| Input | Default |
|---|---|
| Minimum age | 16 |
| Age boundaries (comma separated) | 30,45,60 |
| Maximum age | 100 |
| Date to calculate age on | today |
Worked example: minimum 16, maximum 100, boundaries 22,30,55 gives four brackets:
There is a button to work out the minimum age and the boundaries from the target with the matching name, so you don't retype what you already entered on the targets side.
Date to calculate age on defaults to today, but for an assembly you usually want the age people will be at the event, not at registration — so this is often set to the first assembly date.
For when the form offers plenty of options and the target has few. Ethnicity is the standard case: 10 options on the form, 4 target buckets.
When someone registers, the system looks their answer up in that saved table and sets the target value accordingly.
Note the ordering constraint: the field you map from has to exist before you can build the mapping, because you pick it from a list of existing “choice of options” fields.
For when the form has a free-text box and the target has a small set of values, with a big lookup table in between. Postcode to region is the standard case.
postcode.
The column titles should match the field name and the target name — postcode and region in this example.
When someone registers, the system looks their postcode up in the saved table and sets the target value.
Worth checking against the data-retention rules. The project's GDPR position is that no long-term copies of uploaded files are kept. A postcode-to-region CSV is reference data rather than personal data, so it is probably fine to store — but it arrives through a file upload, which is exactly the path that rule is about. Worth a decision rather than an assumption.
A shortcut past the blank page. Almost every assembly needs the same eligibility, contact, and consent fields, so they are offered as a checklist rather than built one at a time.
flowchart TD
classDef hub fill:#cce2f7,stroke:#1d70b8,color:#0b0c0c
classDef field fill:#c8e6c9,stroke:#2e7d32,color:#0b0c0c
classDef form fill:#f3f2f1,stroke:#505a5f,color:#0b0c0c
classDef done fill:#e1bee7,stroke:#6a1b9a,color:#0b0c0c
B(["Add common fields"]):::hub
M["Pop-up: the common fields, grouped into<br/>standard sections. Each has a description<br/>and a checkbox."]:::form
B --> M
E["Eligibility<br/>can_attend - I can attend all dates<br/>eligible - I am eligible to attend"]:::form
C["Contact details<br/>first_name, last_name, email, phone,<br/>address_line_1, address_line_2, city, postcode"]:::form
A["About you<br/>gender, date_of_birth, year_of_birth"]:::form
K["Consent<br/>consent - store my data per the linked policy<br/>stay_on_db (optional) - contact me about future events"]:::form
M --> E
M --> C
M --> A
M --> K
ACC["Tick the ones you want, click Accept"]:::field
E --> ACC
C --> ACC
A --> ACC
K --> ACC
RES["The chosen fields appear<br/>in your list of fields"]:::done
ED["Edit any of them afterwards<br/>like any other field"]:::field
ACC --> RES --> ED
click M "#common-detail" "The common fields list"
click E "#common-detail" "The common fields list"
click C "#common-detail" "The common fields list"
click A "#common-detail" "The common fields list"
click K "#common-detail" "The common fields list"
| Section | Field | Note |
|---|---|---|
| Eligibility | can_attend | “I can attend all dates” |
eligible | “I am eligible to attend” | |
| Contact details | first_name | |
last_name | ||
email | ||
phone | ||
address_line_1 | ||
address_line_2 | ||
city | ||
postcode | Often also the input to a derived region field | |
| About you | gender | |
date_of_birth | ||
year_of_birth | Alternative to date_of_birth, not an addition to it | |
| Consent | consent | “I consent to you storing my data in accordance with a linked policy” |
stay_on_db | Optional checkbox — “Keep my details and contact me about similar events in the future” |
These are a starting point, not a fixed set. Once added they are ordinary fields: rename them, move them between sections, change the question text.
The other way round from flow 3: instead of building a field and hoping it lines up with a target, start from the target and let it fill in what it can. This is the fastest route to a form that passes the coverage check.
flowchart TD
classDef hub fill:#cce2f7,stroke:#1d70b8,color:#0b0c0c
classDef field fill:#c8e6c9,stroke:#2e7d32,color:#0b0c0c
classDef decide fill:#f8bbd0,stroke:#ad1457,color:#0b0c0c
classDef form fill:#f3f2f1,stroke:#505a5f,color:#0b0c0c
classDef done fill:#e1bee7,stroke:#6a1b9a,color:#0b0c0c
B(["Create field(s) from target(s)"]):::hub
L["One button per target.<br/>Greyed out if a matching field already exists."]:::form
H{"How should the field be created?"}:::decide
B --> L --> H
EX["Exact copy"]:::field
AG["Age ranges"]:::field
MP["Map more options to fewer"]:::field
PC["Map postcode to value"]:::field
H --> EX
H --> AG
H --> MP
H --> PC
EXF["The 'choice of options' form, with the name and<br/>options pre-filled from the target.<br/>You still fill in question text, help text and form type."]:::form
EX --> EXF
AGD["Choose the date field to use as input:<br/>an existing date field, or create one now"]:::form
AGA["Minimum age and age boundaries are auto-filled<br/>from the target - error if they cannot be worked out"]:::form
AGO["You fill in the rest,<br/>e.g. the date to calculate age on"]:::form
AG --> AGD --> AGA --> AGO
MPT["The target is already known"]:::form
MPF["Choose the field to map from"]:::form
MPM["Set up the mapping: one dropdown per<br/>registration option, choices are the target values"]:::form
MP --> MPT --> MPF --> MPM
PCO["Options copied from the target"]:::form
PCI["Field to use as input<br/>default: postcode"]:::form
PCU["Upload the CSV mapping file"]:::form
PC --> PCO --> PCI --> PCU
SAVE["Save - the field(s) appear<br/>and the target is now covered"]:::done
EXF --> SAVE
AGO --> SAVE
MPM --> SAVE
PCU --> SAVE
click EX "#exactcopy-detail" "Exact copy"
click EXF "#exactcopy-detail" "Exact copy"
click AG "#agerange-detail" "Age ranges"
click AGD "#agerange-detail" "Age ranges"
click AGA "#agerange-detail" "Age ranges"
click AGO "#agerange-detail" "Age ranges"
click MP "#mapfewer-detail" "Map more options to fewer"
click MPT "#mapfewer-detail" "Map more options to fewer"
click MPF "#mapfewer-detail" "Map more options to fewer"
click MPM "#mapfewer-detail" "Map more options to fewer"
click PC "#postcode-detail" "Map postcode to value"
click PCO "#postcode-detail" "Map postcode to value"
click PCI "#postcode-detail" "Map postcode to value"
click PCU "#postcode-detail" "Map postcode to value"
The simplest route: the target's name and values become a choice of options field's name and options. Gender in, gender out.
What it cannot fill in is the human half — the question text the respondent reads, the help text, and whether it renders as radios or a dropdown. Those are still yours to write.
Things the description above doesn't settle, drawn out here rather than quietly decided in a diagram.
16, 100, boundaries 22,30,55) needs it to produce a top bracket of 55–99. Confirm it belongs on the form.
gender, age_bracket, region. Holds target values, an optional source URL and an optional comment.
Male, 16-29, North London. Holds a percentage, a min and a max, and an optional comment.
age_bracket, ten ethnicity options to four, postcode to region. See flow 4.