- 🇨🇦Canada colan Toronto 🇨🇦
Marking this as a duplicate of 🌱 Save between steps Active . This one's older, but is on an old branch.
We have a very long multistep entity edit form and we would like to save data between each step to ensure data is not lost if the user does not complete every step.
We used a hook_form_alter to add this:
$form['actions']['next']['#validate'][] = '::validateForm';
$form['actions']['next']['#validate'][] = '::submitForm';
$form['actions']['next']['#validate'][] = '::save';
$form['actions']['back_button']['#validate'][] = '::validateForm';
$form['actions']['back_button']['#validate'][] = '::submitForm';
$form['actions']['back_button']['#validate'][] = '::save';
(I agree with
#3066080
🐛
Validation handler of the next button breaks other form validation
Fixed
, it feels strange to have this in #validate
and not in #submit
.)
But it would be nice to have a supported option directly in the module.
Closed: duplicate
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Marking this as a duplicate of 🌱 Save between steps Active . This one's older, but is on an old branch.