Save between steps

Created on 12 May 2023, over 1 year ago
Updated 20 August 2024, 4 months ago

This is a great module. Only thing really missing for me is having a save button on every step. Are there plans to implement that?

Another great improvement would be making the step names clickable so you could get to the step you need to edit without having to click next, next etc.

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States guymandude

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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 9 months ago
  • πŸ‡ͺπŸ‡¨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 9 months ago
  • πŸ‡ͺπŸ‡¨Ecuador dmezquia UTC-5
  • πŸ‡©πŸ‡ͺ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.

Production build 0.71.5 2024