Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formik form actions cannot be used on nextjs server actions #3977

Open
erlanggaht opened this issue Jul 7, 2024 · 5 comments
Open

Formik form actions cannot be used on nextjs server actions #3977

erlanggaht opened this issue Jul 7, 2024 · 5 comments

Comments

@erlanggaht
Copy link

Bug report

When using

from Formik, the server action does not execute, but it works when using a regular HTML form element

Problem Recording

bandicam.2024-07-07.15-03-34-968.mp4
Software Version(s)
Formik ^2.4.6
React ^18
Browser Mozilla, Chrome, IE
npm/Yarn npm
Operating System Window 11
@juliangorge
Copy link

Hi @erlanggaht , could you tell me if you resolved this and do you know how can send 1_$ACTION_REF_1, 1_$ACTION_1:0, 1_$ACTION_1:1, 1_$ACTION_KEY fields of NextJS Server action security layer with Formik?

@stefanedberg
Copy link

I'm having the same issue. Would be nice if this could be supported. Seems like it works by using <form> without the onSubmit event, but it ruins Formik behavior, so not really an alternative.

<form onReset={formikProps.handleReset} action={action} {...props} />

https://formik.org/docs/api/form

@fabriciob-ciandt
Copy link

Hi team is there some updates about that? We have the same issue.

@juliangorge
Copy link

Hi team is there some updates about that? We have the same issue.

nop from my side

@na-zi-ya
Copy link

I am using Formik in my Next.js application. When I click the submit button without filling out the form, another modal unexpectedly opens, while the current form shows validation messages. What could be causing this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants