Skip to content
Discussion options

You must be logged in to vote

This works as expected. You can disable form reset like so

<form
	use:enhance={() => ({ update }) => update({ reset: false })}
>
    ...
</form>

If you want to persist the state when javascript isnt active, you need to return the form values in your action alongside any errors https://kit.svelte.dev/docs/form-actions#anatomy-of-an-action-validation-errors

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@hyunbinseo
Comment options

@david-plugge
Comment options

Answer selected by hyunbinseo
@hyunbinseo
Comment options

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