Function: getPrefillOptionsForTypeFrom()
function getPrefillOptionsForTypeFrom(catalog: PrefillProvider, fieldType:
| "number"
| "date"
| "file"
| "email"
| "url"
| "select"
| "text"
| "checkbox"
| "textarea"
| "phone"
| "radio-group"
| "multiselect"
| "field-array"
| "image"
| "file-download"
| "section-header"
| "section-unset"
| "signature"
| "signature-adopted"): {
label: string;
value: string;
}[];Defined in: shared/forms/prefill-options.ts:12
Flattens a PrefillProvider for a single field type into the
{ value, label } entries a builder UI's "Default value" select can
bind to. Each entry's value is the dot-path the form schema stores
under field.prefillFrom ("<source>.<field>"); label is the
human-readable breadcrumb the inspector renders. Source ordering is
preserved.
Parameters
| Parameter | Type |
|---|---|
catalog | PrefillProvider |
fieldType | | "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted" |
Returns
{
label: string;
value: string;
}[]