I want to create multi step form based on tabs created using Fieldgroups. I have been able to alter the ECK form as well as added my own custom submit handler.
In the custom submit handler, I have added a form redirect that redirects to the same form but with a fragment so that the next tab gets shown. I am able to generate the fragment for the route, but its not working. In-fact, the redirect seems to not work at all for any valid internal route. Kindly advise.
Please find the form redirect url.
$url = new Drupal\Core\Url('eck.entity.add' , ['eck_entity_type' => 'registration_configuration' , 'eck_entity_bundle' => 'config_2'] , ['fragment' => 'edit-group-add']); $form_state->setRedirectUrl($url);