- Issue created by @espurnes
- 🇪🇸Spain espurnes
After some digging I was not able to keep the
$form[$child_id]['#access'] = FALSE;
in the MultistepController rebuildForm method and preserve the updated step fields values when going back to the previous step.So, even if it is not the best option, I decided to add a new configuration (use_hidden_flow) at step level to change the
$form[$child_id]['#access'] = FALSE;
by a$form[$child_id]['#attributes']['class'][] = 'hidden';
.If in a form with 3 steps, we enable the use_hidden_flow, all the fields will be rendered (but hidden with css) on each step.
If in step 2, when going back to step 1, the step 2 changes are applied. So, when returning to step 2 the fields do have the previous values.
If the new parameter use_hidden_flow is not enabled, the module continues working as before.