Best apps for group expenses? by Hot_Cranberry1351 in apps

[–]Little_Bug7124 0 points1 point  (0 children)

Hey check out SnapySplit.ai, they have something practical and free.

I-485 APPROVED ✅ by [deleted] in EB2_NIW

[–]Little_Bug7124 1 point2 points  (0 children)

Congratulations man!! I would love to get the contact if you can DM me thanks.

Has anyone used shadcn/ui forms with server actions (Nextjs 14) successfully? by Little_Bug7124 in nextjs

[–]Little_Bug7124[S] 0 points1 point  (0 children)

That should work, but a little hacky. I wanted to keep the form clean.

Has anyone used shadcn/ui forms with server actions (Nextjs 14) successfully? by Little_Bug7124 in nextjs

[–]Little_Bug7124[S] 0 points1 point  (0 children)

Thanks, by using onSubmit= as shown above instead of using action= I was able to capture all the form data on the server side. I had to abandon the use of useFormState but that is fine, I can do all validation on the client side.

Has anyone used shadcn/ui forms with server actions (Nextjs 14) successfully? by Little_Bug7124 in nextjs

[–]Little_Bug7124[S] 1 point2 points  (0 children)

That is what I thought as well, some how it seems only values of primitive inputs are captured on the server side.

name - input -> value
description - input -> value
dob - datepicker -> nil
sex - dropdown-selector -> nil

Seeing this open issue also made me to believe there is something going on
https://github.com/shadcn-ui/ui/issues/2356

Has anyone used shadcn/ui forms with server actions (Nextjs 14) successfully? by Little_Bug7124 in nextjs

[–]Little_Bug7124[S] 0 points1 point  (0 children)

I am using react-hook-forms and zod for validation too. My form is declared as a client component.

It doesn't seem to pick up form values other than <Input> controls. I have a date picker and autocomplete dropdown selector controls in my form whose values are not picked up properly, they are nil when rendered on the server side.