Can't get Formsnap & Superforms to work #1028
-
Hello everyone, I can't get the form element to work. src\routes\shadcn\schema.js:
src\routes\shadcn+page.server.js:
src\routes\shadcn+page.svelte:
With this I always get the error: TypeError: Cannot read properties of undefined (reading 'email') With this form element, however, everything works as it should and without errors:
What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, I'm using the form component within an SPA. It works for me but it's hard to compare exactly since I don't have the server.ts page bit to compare. My guess would be that in the
Having done that, you can now access So you could then have:
... with the change being the input value is now using Like I say: total guess but can't hurt to try that until someone else suggests a solution :) |
Beta Was this translation helpful? Give feedback.
-
Thanks!
Made the trick for me |
Beta Was this translation helpful? Give feedback.
Hi,
I'm using the form component within an SPA. It works for me but it's hard to compare exactly since I don't have the server.ts page bit to compare. My guess would be that in the
script
in yourpage.svelte
you perhaps instead need to have:Having done that, you can now access
$formData
. Since based on thatTypeError: Cannot read p…