MishkaGervaz.Form.Entities.Footer (MishkaGervaz v0.0.1-alpha.3)

Copy Markdown View Source

Form footer — content rendered below the submit row.

Accepts a static or dynamic content block, a custom HEEx render escape hatch, and visibility / restriction gating consistent with MishkaGervaz.Form.Entities.Field and MishkaGervaz.Form.Entities.Group. content accepts a string or zero-/one-arity function so the footer can reflect form state.

Example

layout do
  footer do
    content fn state -> "Last updated by #{state.field_values[:updated_by]}" end
    class "mt-4 text-xs text-gray-500"
  end
end

See MishkaGervaz.Form.Dsl.Layout for the surrounding section.

Summary

Types

t()

@type t() :: %MishkaGervaz.Form.Entities.Footer{
  __spark_metadata__: map() | nil,
  class: String.t() | nil,
  content: String.t() | (-> String.t()) | (map() -> String.t()) | nil,
  extra: map(),
  render:
    (map() -> Phoenix.LiveView.Rendered.t())
    | (map(), map() -> Phoenix.LiveView.Rendered.t())
    | nil,
  restricted: boolean() | (map() -> boolean()),
  visible: boolean() | (map() -> boolean())
}

Functions

transform(footer)