Shared form handling runtime for both LiveView and Component.
This module contains the common logic for form operations:
extract_resource/1- Extract Ash resource from various form typesextract_changeset/1- Extract Ash changeset from various form typesextract_submit_errors/1- Turn an Ash submit failure into a per-field error mapbroadcast_mutation/1- Broadcast mutation events for PubSub invalidation
Summary
Functions
Broadcast mutation to all relevant PubSub topics.
Extract the Ash changeset from various form types.
Extract the Ash resource module from various form types.
Extract per-field errors from an Ash submit failure for storage in _server_errors state.
Functions
Broadcast mutation to all relevant PubSub topics.
Uses the resource's notify_on configuration from Lavash.Resource extension to enable fine-grained invalidation based on filter combinations.
Extract the Ash changeset from various form types.
Supports:
Lavash.Formwith embedded changesetPhoenix.HTML.Form(recurses into source)AshPhoenix.Formwith Ash.Changeset sourceAsh.Changesetdirectly
Extract the Ash resource module from various form types.
Supports:
Lavash.Formwith embedded changesetAsh.ChangesetAshPhoenix.FormPhoenix.HTML.Form(recurses into source)
Extract per-field errors from an Ash submit failure for storage in _server_errors state.
Returns a map of %{"field_name" => ["error message", ...]}.