Repository navigation
Support the SubmissionFinalizing event in automagic forms - #37
Draft
duncanmcclean wants to merge 1 commit into
Draft
duncanmcclean wants to merge 1 commit into
duncanmcclean wants to merge 1 commit into
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a2178e-0cf5-75e7-850e-6788c4290e77 Co-authored-by: Amp <amp@ampcode.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for core's new
SubmissionFinalizingevent to automagic forms.When a
SubmissionFinalizinglistener holds a submission, it's kept as apartialrather than being finalized. However, automagic forms stored the held submission in the session as the resumable partial and sent the user back to the first page, so they never reached the checkout (or the success page) and could submit again.This PR fixes it by:
FormController.RedirectResponse(eg. to a payment checkout).false.router.visit()makes an XHR request, which fails for external URLs.This PR depends on the core PR. The
statamic/cmsconstraint will need bumping once it's merged and tagged, so CI will fail until then.Related: statamic/cms#16069