A pure functional form component
This component renders the form HTML based on a DynamicForm.Instance configuration.
Example
<DynamicForm.Renderer.Component.render
instance={@form_instance}
form={@form}
submit_text="Submit Form"
phx_submit="submit"
phx_change="validate"
form_id="my-dynamic-form"
/>
Summary
Functions
Attributes
instance(:any) (required) - The form instance configuration. Can be an Instance struct, JSON string, or map that will be decoded into an Instance.form(Phoenix.HTML.Form) (required) - The Phoenix form struct.submit_text(:string) - Text for the submit button. Defaults tonil.phx_submit(:string) - Phoenix event name for form submission. Defaults to"submit".phx_change(:string) - Phoenix event name for form validation. Defaults to"validate".target(:any) - Phoenix LiveView target for events. Defaults tonil.form_id(:string) - HTML ID for the form element. Defaults to"dynamic-form".disabled(:boolean) - Whether the form is disabled. Defaults tofalse.hide_submit(:boolean) - Whether to hide the submit button (useful when using an external submit button). Defaults tofalse.gettext(:atom) - Gettext backend module for translations. Defaults toDynamicForm.Gettext.uploads(:map) - Upload configurations for file fields. Defaults to%{}.parent_id(:string) - Parent component ID for LiveComponent communication. Defaults tonil.components(:atom) - Custom components module (e.g. the app's Phoenix-generated CoreComponents); functions it exports override the built-ins per function — see DynamicForm.ComponentResolver. Defaults tonil.custom_field_types(:map) - Custom field types map (type name => Ecto type), merged over the :dynamic_form, :custom_field_types config — see DynamicForm.FieldTypes. Defaults tonil.