I have a webform that opens inside a modal. Everything works fine. Then I had the problem of closing the modal after the form was submitted. I fixed that to with the help of the following link: https://www.drupal.org/project/webform/issues/3002966#comment-12794056
I have a webform handler that creates a new entity in the postSave()
method. After this entity is created, I want to close the modal and redirect to the entity detail page. What is the best/correct way to do this. I could use a RedirectCommand
instead of the CloseDialogCommand
but how do I get the entity id in the _CUSTOM_MODULE_webform_submission_form_submit_ajax()
method. Using the AjaxResponse with a RedirectCommand
in the postSave()
method didn't work.
Any Suggestions would be great ;-)