You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Turbo ignores renders after a form submission, unless it is accompanied by a 4xx/5xx status code.
The reason for this is (afaik) that the URL could be reloaded by the user as a GET request, which could potentially result in a "page not found" error. Maybe there's even more to it?
But there are other valid reasons to have a POST request render rather than redirect, besides error handling!
For instance a confirmation screen for a booking should be submitted by POST, since I don't want the user to copy the URL and paste it later again. So the idea is a POST request, that renders a page with the confirmation details and a new form that will submit to the final booking page. Even more, if the form was to contain images, it wouldn't even be possible to use a GET request. Custom non-sharable preview pages with file uploads would be a similar use case.
So, could you maybe give us an option to disable the mustRedirect logic? You already have the code, but I can't find a way to disable the mustRedirect logic from the outside. Currently I have to a manual non-Turbo request for confirmation/preview screens, which defeats the idea of writing no JavaScript, or send an wrong status code, which makes log analysis harder and makes me feel really uncomfortable.
The text was updated successfully, but these errors were encountered:
Currently Turbo ignores renders after a form submission, unless it is accompanied by a 4xx/5xx status code.
The reason for this is (afaik) that the URL could be reloaded by the user as a GET request, which could potentially result in a "page not found" error. Maybe there's even more to it?
But there are other valid reasons to have a POST request render rather than redirect, besides error handling!
For instance a confirmation screen for a booking should be submitted by POST, since I don't want the user to copy the URL and paste it later again. So the idea is a POST request, that renders a page with the confirmation details and a new form that will submit to the final booking page. Even more, if the form was to contain images, it wouldn't even be possible to use a GET request. Custom non-sharable preview pages with file uploads would be a similar use case.
So, could you maybe give us an option to disable the
mustRedirect
logic? You already have the code, but I can't find a way to disable themustRedirect
logic from the outside. Currently I have to a manual non-Turbo request for confirmation/preview screens, which defeats the idea of writing no JavaScript, or send an wrong status code, which makes log analysis harder and makes me feel really uncomfortable.The text was updated successfully, but these errors were encountered: