AshFormBuilder.FormRenderer
(AshFormBuilder v0.2.0)
View Source
Phoenix function components that render form entities.
Structural rendering (entity iteration, nested inputs_for loops, add/remove
buttons) lives here. Per-field widget rendering is delegated to the configured
theme module via AshFormBuilder.Theme.
Theme configuration
config :ash_form_builder, :theme, MyApp.MyFormThemeDefault: AshFormBuilder.Themes.Default.
Theme Callbacks
The theme module implements:
AshFormBuilder.Theme.render_field/2- Renders individual form fieldsAshFormBuilder.Theme.render_nested/1- (Optional) Custom nested form rendering
Summary
Functions
Renders all entities (fields and nested forms) for a form.
Renders a nested relationship form block with add/remove buttons.
Functions
Renders all entities (fields and nested forms) for a form.
Required assigns:
:form—Phoenix.HTML.Form:entities— list ofFieldandNestedFormstructs:target— LiveComponent target (@myself):wrapper_class— CSS class for the wrapper div
Attributes
form(Phoenix.HTML.Form) (required)entities(:list) (required)target(:any) - Defaults tonil.wrapper_class(:string) - Defaults to"space-y-4".theme_opts(:list) - Defaults to[].
Renders a nested relationship form block with add/remove buttons.
Attributes
form(Phoenix.HTML.Form) (required)nested(:any) (required)target(:any) - Defaults tonil.theme_opts(:list) - Defaults to[].