Builds wizard/tabs step configuration from DSL.
Steps define the multi-step form flow. Each step references groups, has optional validation actions, and lifecycle callbacks.
Overridable Functions
build/2- Build steps from config and resourceinitial_step/1- Determine the initial stepinitial_step_states/1- Build initial step states mapstep_valid?/2- Check if a step is valid/complete
User Override
defmodule MyApp.Form.StepBuilder do
use MishkaGervaz.Form.Web.State.StepBuilder
def initial_step(steps) do
# Always start at the second step
case steps do
[_, second | _] -> second.name
_ -> super(steps)
end
end
endSee MishkaGervaz.Form.Web.State,
MishkaGervaz.Form.Entities.Step, and the sibling builders
FieldBuilder, GroupBuilder, Access, Presentation.