Annotate the patient entity once; the form's labels, requireds, and select options come along automatically.
Prefill fields from your entity schema
Annotations live on the entity, not the form. That means one edit to the entity propagates to every form (and every other LCAP surface) that consumes it. The Forms builder reads those annotations at import time, and the admin preview reads them again at render time — so the loop is short.
1. Annotate the patient entity
Open Entities, type patient, click Load, then open
the Annotations tab. Add three annotations:
first_name→ labelFirst name.dob→ labelDate of birth,formatting: "MM/DD/YYYY".preferred_language→ labelPreferred language, with enum optionsEnglish,Spanish,Mandarin,Other.
If you'd rather author by hand, the panel accepts JSON:
{
"first_name": { "label": "First name" },
"dob": { "label": "Date of birth", "formatting": "MM/DD/YYYY" },
"preferred_language": {
"label": "Preferred language",
"enum": ["English", "Spanish", "Mandarin", "Other"]
}
}
Save. The annotations are now read by both the builder's From entity importer and the admin preview's renderer.
2. Re-author the form from the entity
Open Patient Intake in the Forms list. In the builder's
field palette, switch to the From entity tab and pick
patient. The importer lists every field on the entity and
offers to drop them onto the current page. Accept all.
Existing fields with matching keys are replaced — the
importer is destructive on key collisions by design, so the
imported metadata wins. Every imported field gets a
source.entity = "patient" provenance stamp; the builder
uses that stamp later to decide which renderer to use.
3. Watch SmartField pick up live edits
Open the admin preview. Source-stamped fields now render
through the LCAP <SmartField /> resolver — the label on
first_name reads from the entity's annotation, not from a
copy frozen into the form.
Prove it: leave the preview open in one tab, open the
patient annotations in another, and rename first_name's
label from First name to Legal first name. Save. Reload
the preview tab — the label updates. No form re-publish, no
build step.
4. Save and re-publish
Once the page reads the way you want it to, click Save, then Publish. The published version row freezes the current label and enum text into the public renderer, so submitters see the same options as your operators do — until your next annotation change and re-publish.
Verify it worked
Open the admin preview for Patient Intake. Confirm:
first_nameshows asFirst name.dobshows asDate of birthwith anMM/DD/YYYYplaceholder.preferred_languageshows as a select withEnglish,Spanish,Mandarin,Other.
Now open the patient annotations and rename
preferred_language to Language preference. Save, reload
the preview. The select's label updates — the options stay
put. That's the loop: edit once on the entity, the admin
preview tracks it.
Next
Continue with Conditional routing.