๐ช Multi-step Form
A 3-step dev identity card wizard. All form state lives on the server and persists across page refreshes โ no client serialization, no session cookies, no localStorage.
$c->setSessionData('wizard', [...]) on every Next/Back action. Refreshing the page resumes exactly where you left off.Step 1: The Basics
โก Signals
step
int TAB 1 Current wizard step (1โ3). Controls which step UI is rendered.
name
string TAB "" Developer name, collected in step 1.
role
string TAB "Backend Dev" Selected role from dropdown in step 1.
years
int TAB 3 Years of experience, entered in step 1.
sphp โฆ sother
bool TAB false One boolean signal per stack technology, bound to checkboxes in step 2.
editor
string TAB "VS Code" Favourite editor, selected in step 2.
error
string TAB "" Validation message set by the next action on step 1 failure.
๐ฏ Actions
next
Validates step 1, increments step, and calls $c->sync() to render the next step.
back
Decrements step and re-renders. Signal values from the previous step are preserved.
restart
Resets all signals to defaults and returns to step 1.
๐ Views
wizard.html.twig
Single template with step-conditional blocks. Only the demo block re-renders on each step transition.