Formik: What's the best way to make a submit button outside the Form?

Created on 26 Nov 2019  路  2Comments  路  Source: formium/formik

鉂換uestion

I know this has been asked multiple times, but I can't get a good solution. React Ref's don't seem to do it, and giving the button & form the same id only seem to submit the form via url, which is buggy in a SPA.

Formik Duplicate User Land

Most helpful comment

You can use a ref and call submitForm(). Otherwise you must lift <Formik> higher up your react tree

All 2 comments

Any solutions?

You can use a ref and call submitForm(). Otherwise you must lift <Formik> higher up your react tree

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PeerHartmann picture PeerHartmann  路  3Comments

jaredpalmer picture jaredpalmer  路  3Comments

giulioambrogi picture giulioambrogi  路  3Comments

jordantrainor picture jordantrainor  路  3Comments

najisawas picture najisawas  路  3Comments