A worked example of a real registration page: the fields on the left (coloured by the section they appear in), the stratification targets on the right, and the arrows showing how each field's data flows through — sometimes directly, sometimes via a derived intermediate value.
flowchart LR
classDef check fill:#e1bee7,stroke:#6a1b9a,color:#0b0c0c
classDef contact fill:#cce2f7,stroke:#1d70b8,color:#0b0c0c
classDef about fill:#c8e6c9,stroke:#2e7d32,color:#0b0c0c
classDef derived fill:#f3f2f1,stroke:#505a5f,color:#0b0c0c
classDef target fill:#fad7a8,stroke:#b58840,color:#0b0c0c
classDef usage fill:#d7ccc8,stroke:#5d4037,color:#0b0c0c
subgraph CH["Checkboxes"]
direction TB
f_can_attend["can_attend"]:::check
f_eligible["eligible"]:::check
f_consent["consent"]:::check
f_stay["stay_on_db"]:::check
end
subgraph CO["Contact details"]
direction TB
f_first["first_name"]:::contact
f_last["last_name"]:::contact
f_email["email"]:::contact
f_phone["phone"]:::contact
f_addr1["address_line_1"]:::contact
f_addr2["address_line_2"]:::contact
f_city["city"]:::contact
f_postcode["post_code"]:::contact
end
subgraph AB["About you"]
direction TB
f_gender["gender"]:::about
f_dob_d["dob_day"]:::about
f_dob_m["dob_month"]:::about
f_dob_y["dob_year"]:::about
f_ethnicity["ethnicity"]:::about
f_disability["disability"]:::about
f_education["education_level"]:::about
f_occupation["occupation"]:::about
end
age(["age"]):::derived
ethmap["combine 10 options<br/>into buckets"]:::derived
geolook["post_code lookup table"]:::derived
rulook["post_code lookup table"]:::derived
addrmatch["match against<br/>posted-letter addresses"]:::derived
subgraph TG["Selection targets"]
direction TB
t_gender["gender"]:::target
t_age["age_bracket"]:::target
t_eth["ethnicity_bucket"]:::target
t_dis["disability"]:::target
t_edu["education_level"]:::target
t_occ["occupation"]:::target
t_geo["geo_bucket"]:::target
t_ru["rural_urban"]:::target
t_addr["address_check<br/>(target zero for BAD)"]:::target
end
subgraph US["Other usages (not targets)"]
direction TB
u_gate["Allowed to submit<br/>the form"]:::usage
u_future["Future-contact<br/>opt-in list"]:::usage
u_contact["Contact & confirm<br/>attendance"]:::usage
end
f_can_attend --> u_gate
f_eligible --> u_gate
f_consent --> u_gate
f_stay --> u_future
f_first --> u_contact
f_last --> u_contact
f_email --> u_contact
f_phone --> u_contact
f_addr1 --> u_contact
f_addr2 --> u_contact
f_city --> u_contact
f_postcode --> u_contact
f_gender --> t_gender
f_dob_d --> age
f_dob_m --> age
f_dob_y --> age
age --> t_age
f_ethnicity --> ethmap --> t_eth
f_disability --> t_dis
f_education --> t_edu
f_occupation --> t_occ
f_postcode --> geolook --> t_geo
f_postcode --> rulook --> t_ru
f_addr1 --> addrmatch
f_addr2 --> addrmatch
f_city --> addrmatch
f_postcode --> addrmatch
addrmatch --> t_addr
click age "#age-detail" "How age and age_bracket are derived"
click t_age "#age-detail" "How age and age_bracket are derived"
click ethmap "#eth-detail" "How ethnicity is bucketed"
click t_eth "#eth-detail" "How ethnicity is bucketed"
click geolook "#geo-detail" "Postcode lookups"
click rulook "#geo-detail" "Postcode lookups"
click t_geo "#geo-detail" "Postcode lookups"
click t_ru "#geo-detail" "Postcode lookups"
click addrmatch "#addr-detail" "How the address check works"
click t_addr "#addr-detail" "How the address check works"
click t_gender "#direct-detail" "Fields used directly as targets"
click t_dis "#direct-detail" "Fields used directly as targets"
click t_edu "#direct-detail" "Fields used directly as targets"
click t_occ "#direct-detail" "Fields used directly as targets"
click f_postcode "#postcode-detail" "post_code is used in more than one way"
click u_gate "#nontarget-detail" "Fields not used for targets"
click u_future "#nontarget-detail" "Fields not used for targets"
click u_contact "#nontarget-detail" "Fields not used for targets"
Click any box in the diagram to jump to its details below. This is one real-world example, not an exhaustive template — it's meant to give a good feel for how fields and targets relate.
Several fields are collected in the same shape they're used for stratification, so they flow straight across with no transformation:
gender → genderdisability → disabilityeducation_level → education_leveloccupation → occupationEven "direct" fields still come from a fixed set of options agreed with the client, so the recorded value already matches a target category.
The three separate fields dob_day, dob_month and dob_year are combined to calculate an intermediate value, age. The age is then mapped into an age_bracket, and it's the bracket — not the raw age — that is used as the target.
The brackets used in this example, with a note on some special cases:
| Bracket | Note |
|---|---|
| 0–17 | Target is zero — under-18s are not selected |
| 18–24 | |
| 25–34 | |
| 35–50 | |
| 51–64 | |
| 65–74 | |
| 75–100 | |
| 100+ | Target is zero; any 100+ value is double-checked to confirm the data is actually valid |
So the flow is: dob_day + dob_month + dob_year → age → age_bracket.
The form offers 10 ethnicity options, deliberately fine-grained so that people feel included and can see themselves represented. For the target, though, those options are combined into a smaller number of ethnicity_bucket values.
For example, several "White" options collapse into a single bucket:
White British, White Irish, White - other → WhiteSo the field value is recorded at full granularity, and the bucketing happens on the way to the target.
The single post_code field feeds two separate targets, each derived through its own lookup table:
post_code → lookup table → geo_bucketpost_code → lookup table → rural_urbanThe registrant only ever enters their postcode; the geographic bucket and the rural/urban classification are looked up from it, so neither is asked for directly.
Invitation letters were posted to a randomly selected set of addresses. When someone registers, the address they enter — address_line_1, address_line_2, city and post_code — is matched against that list of addresses we wrote to:
address_check = OKaddress_check = BAD
address_check is then used as a target with a value of zero for BAD. Because the selection cannot pick anyone into a category whose target is zero, this is the mechanism that excludes registrations from addresses we didn't invite.
You can read this either way round: as a target (shown on the right of the diagram), or as a post-submission filter that drops invalid registrations. They're the same thing — the zero target is the drop.
A field appears exactly once on the registration page, but the same value can be used in several ways. post_code is the clearest example:
geo_bucket targetrural_urban targetaddress_check match (with the other address fields)There may be others — the point is that "collected once" does not mean "used once".
Not every field feeds the stratified selection. In this example:
can_attend, eligible and consent all have to be ticked before the form can be submitted at all. They gate submission rather than describing the person.
stay_on_db ("keep my details and contact me about similar events in the future") can be ticked or not; it drives a future-contact opt-in list, not selection.
post_code is the exception that also feeds targets — see above.)