Skip to content
Discussion options

You must be logged in to vote

The issue was that calling update() did not update the page.form values. See the reason below:

Without an argument, use:enhance will emulate the browser-native behaviour, just without the full-page reloads. It will:

update the form property, $page.form and $page.status on a successful or invalid response, but only if the action is on the same page you're submitting from. So for example if your form looks like <form action="/somewhere/else" ..>, form and $page will not be updated. This is because in the native form submission case you would be redirected to the page the action is on.

https://kit.svelte.dev/docs/form-actions#progressive-enhancement-use-enhance

Otherwise, something like th…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@colmanhumphrey
Comment options

@colmanhumphrey
Comment options

Answer selected by colmanhumphrey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants