14 questions
0
votes
1
answer
50
views
SvelteKit + Superforms: Data flickers and is replaced by wrong data on page reload
I'm building a SvelteKit application where users can edit student details on a dynamic route (/student/[id]). I'm using Supabase for the database and SvelteKit Superforms to handle the form.
The ...
0
votes
0
answers
47
views
Changed a form dataType to json and now need to add a new field on submit. How?
I have a form, that was working with dataType:'form', but needed to add a nested form inside the original one and so changed the dataType to 'json'. Here is the schema:
z.object({
typeId: z....
-1
votes
1
answer
103
views
Svelte / SuperForm - Checkbox value instead of boolean
I try to use checkboxs with SuperForm (and formFieldProxy).
And i have some problems:
i don't understand why i have no way (or don't find the one) to retrieve checkbox value instead of the checked ...
1
vote
1
answer
806
views
Form Enhancement with Superforms and Shadcn Svelte does not work in svelte 5
I've started a new project using svelte kit with svelte 5. I opted for shadcn-svelte and build a simple login form with superforms.
<script lang="ts">
import type {PageData} from &...
0
votes
1
answer
645
views
Svelte 5 and Superforms: Error Submiting Value of a DatePicker Component
I'm working with Svelte 5 and using Superforms for form handling. My goal is to bind a CalendarDate object from a custom DatePicker component to a Superforms field and then convert that CalendarDate ...
0
votes
1
answer
762
views
Superforms : updating array of objects
I'm trying to work with schema that looks like this (using zod):
const examSchema = z.object({
name: z.string().min(4).max(250),
message: z.string().max(500).optional(),
maxPoints: z....
0
votes
1
answer
848
views
Superforms, zod and server actions not running
I have an array of id's, i would like to display a button for each id which when clicked submits the id to an action in my page.server.ts. It should be simple but i'm pulling my hair out trying to ...
0
votes
1
answer
667
views
How do I get sveltekit +page.server.ts data into a svelte component?
I have a svelte component that displays a form using https://superforms.rocks and is setup as follows:
routes/
├─ blog/
├── +page.server.ts
├── +page.svelte
├── component.svelte
My experience is that ...
0
votes
0
answers
400
views
Global State management in sveltekit
im using sveltekit with superforms, i want t implement a global state manager using a store, the problem is when i try to access the return from +page.server.ts i get a value of undefined
add: ...
0
votes
1
answer
730
views
Checkbox missing in form data when using SvelteKit Superforms with Zod
I am trying to build a form using SvelteKit Actions, Superforms, Formsnap and Zod. But my checkbox is not working as expected.
// schema.ts
export const formSchema = z.object({
...
private: z....
1
vote
2
answers
2k
views
Sveltekit form actions with super forms clearing input before post
I have a register form that takes an email and password. It is validated using zod and SuperForms. When I submit the form the data from the form is cleared before requesting the form action defined in ...
3
votes
1
answer
744
views
SvelteKit SuperForms message always undefined
I am developing a form with Sveltekit, sveltekit-superforms, drizzle, zod schema to be able to perform server-side checks of the form, the problem subsists in the fact that after performing the checks,...
3
votes
1
answer
2k
views
Superforms overwrites form elements on update
I'm creating an AI chat application using SvelteKit and Superforms.
The application has an input field for writing a message. When pressing enter, the input field is cleared, and two messages are ...
4
votes
0
answers
798
views
SvelteKit superforms in SSG mode gives typescript error for data.form. Where my `form`?
I got error for
My application is working correctly. My form adds computers correctly but typescript says:
Property 'form' does not exist on type '{}'.
Typescript talking about the form in superForm(...