- First commit to issue fork.
- Status changed to Needs review
5 months ago 10:41am 27 June 2024 - 🇮🇳India rajeshreeputra Pune
I added the hook_menu_local_tasks_alter() to modify the edit URL to local task of content to use forms steps functionality while editing. This allows users to edit content using the forms steps. Additionally, adding static patch here.
- 🇮🇳India rajeshreeputra Pune
Updated the patch to work with forms_steps id than content type id.
Super helpful. thanks
To find the information (machine names) you'll need to create a forms instance programatically, within the Drupal Admin UI, load a 'form steps collection' .
/admin/config/workflow/forms_steps/
Some comments to explain where to use the forms_steps machine names
$forms_steps_workflow = Workflow::create([
'instance_id' => \Drupal::service('uuid')->generate(),
'entity_type' => 'node',
'bundle' => 'drupal_entity_name', // Machine name of the entity attaching to the form steps instance
'entity_id' => $currently_loaded_entity->id(),
'form_mode' => 'another_type_of_step_reference', // Form mode, another machine name referencing the step
'forms_steps' => 'your_collection_id', // Collection ID (as used in route below), which is the machine name of these form steps.
'step' => 'your_step_machine_name', // Machine name of step
]);$forms_steps_workflow->save();
$instance_id = $forms_steps_workflow->instance_id->value;// Redirect route = {forms_steps}.{collection_id}.{step_machine_name}
$redirect_url = Url::fromRoute('forms_steps.your_collection_id.' . 'your_step_machine_name', ['instance_id' => $instance_id])->toString();
$response = new RedirectResponse($redirect_url);
$response->send();