In the following code, I want to submit the form and disable turbo. The reason is that after the form submission I would like to redirect to an external website. This is not working now. Is this intentional or am I missing anything?
Note that this frame is lazy loaded in a different page.
The target="_top" belongs on the turbo-frame element …
But I tried that too - and I suspect there is a bug with being able to switch off turbo for form submissions inside a frame.
What I have done instead is capture the submit event with stimulus and call the stopPropagation method on the event. That prevents the form from being submitted via Turbo.
Thanks. I also think this is a bug that turbo is not disabled when the form is in a turbo-frame. My solution was to use a Stimulus content loader instead of a turbo frame. But I find your solution elegant too.