Preserving url on form submission with errors? #2587
Bernardofccoelho
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
The POST/PUT/PATCH should be handled by Inertia.js, you shouldn't have any redirect. How does your controller look like? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
To minimize unnecessary redirects, my goal is to keep the current URL (instead of the POST URL) when validation errors occur, and only switch to the page.url on success (handled via resolveUrlUsing on the backend).
At the moment, I’ve been using the resolveUrlUsing method for both error and success cases, but that feels more complex than necessary.
Given this, I was wondering: similar to how the preserveState option accepts a page callback, would it be possible to support the same behavior for the preserveUrl request option?
Beta Was this translation helpful? Give feedback.
All reactions