sveltekit-superforms icon indicating copy to clipboard operation
sveltekit-superforms copied to clipboard

json form losing value / resetting to previous value in svelte5

Open unlocomqx opened this issue 1 year ago • 3 comments

  • [x] Before posting an issue, read the FAQ and search the previous issues.

Description When using a json form with svelte5, the form resets to a previous value when it's submitted

If applicable, a MRE Here's a minimal repro https://github.com/unlocomqx/superforms-svelte5

CleanShot 2024-03-31 at 15 27 01@2x

unlocomqx avatar Mar 31 '24 14:03 unlocomqx

nvm, it was caused by resetForm being set to true by default. closing.

unlocomqx avatar Mar 31 '24 16:03 unlocomqx

Just spent an hour wrestling with this same issue and resetForm: false solved it, thanks for posting this!

slingshotsys avatar Jun 24 '25 22:06 slingshotsys

Reopening to as a reminder to add to get started docs. (It's also available as the second question in the FAQ)

ciscoheat avatar Jun 25 '25 06:06 ciscoheat