MishkaGervaz.Form.Dsl.Hooks (MishkaGervaz v0.0.1-alpha.3)

Copy Markdown View Source

Hooks section DSL definition for form configuration.

Defines lifecycle callbacks for form events.

Example

hooks do
  before_save fn params, state ->
    # Transform params before saving
    Map.put(params, "processed", true)
  end

  after_save fn result, state ->
    # Side effects after save
    Logger.info("Saved: #{inspect(result)}")
    state
  end
end

Summary

Functions

Returns the hooks section definition.

Functions

section()

Returns the hooks section definition.