- Issue created by @guymandude
- πͺπΈSpain jlecinaj
Good point, I'm looking for something similar, lets see if someone can bring some light to the matter.
- πͺπ¨Ecuador dmezquia UTC-5
You can do this by overriding or adding a new function to NextStep, example:
In
CustomNextStep
function add the new logic for updating entity./** * Implements hook_field_group_form_process(). */ function my_module_field_group_form_process(array &$element, &$group, &$complete_form): void { // Change the submit function of the "next" step. if ($next_btn = &$complete_form['actions']['next']) { $next_btn['#submit'][0] = [CustomMultiStepManager::class, 'CustomNextStep']; } }
- Status changed to Needs work
8 months ago 10:06am 14 March 2024 - πͺπ¨Ecuador dmezquia UTC-5
Another quick and better way, which will be added to the module in the future, is to add the "Save" function for the "Next Step" button.
'#submit' => ['simple_multistep_register_next_step', '::save'],
I am upload a patch for this while it is validated by the community and added to a future release.
- Status changed to Needs review
8 months ago 10:09am 14 March 2024 - π©πͺGermany ammaletu Bonn, Germany
The patch works for me, but you need to add it in both "showNextButton" and "showBackButton".
- πΊπΈUnited States trrroy
I can see the save working with the #4 patch but when I get to the final step, after clicking the node Save button, I get "Error message: The content has either been modified by another user, or you have already submitted modifications. As a result, your changes cannot be saved." This is when adding a new node so I'm guessing there's a check on whether this node is new or not. That would fail since the node is already saved.