SelectoComponents.Form.ChoiceSourceMetadata (selecto_components v0.4.8)
Projects query-contract choice-source links into form-friendly field metadata.
Query contracts expose raw fields, field_choice_bindings, and
choice_sources. This module stitches those pieces together so form and UI
code can ask for annotated fields instead of hand-walking the contract.
Link to this section Summary
Functions
Returns only fields that are backed by choice sources.
Looks up one field from the annotated metadata projection.
Returns every query-contract field with choice-source metadata attached when present.
Link to this section Types
contract()
@type contract() :: map()
field_id()
Link to this section Functions
choice_source_fields(contract, opts \\ [])
Returns only fields that are backed by choice sources.
field(contract, field_id, opts \\ [])
Looks up one field from the annotated metadata projection.
fields(contract, opts \\ [])
Returns every query-contract field with choice-source metadata attached when present.
Bound fields keep their original "choice_source" scalar and receive a
sibling "choice_source_metadata" map.