-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
Manually submit form outside of <Form> component #42
Comments
The easiest way to do this is to use a ref: <ReactForm ref={el => this.form = el}>
// Somewhere else in the parent component
this.form.submitForm() Does that work for you? |
Thank you for the response! |
Thanks, wouldn't know what to do otherwise (partly because I've never used |
Yeah I plan on it
…On Fri, May 5, 2017 at 8:39 AM Anton ***@***.***> wrote:
Thanks, wouldn't know what to do otherwise. @tannerlinsley
<https://github.com/tannerlinsley> I think it would be worth adding to
the documentation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFUmCfXWgcwDRL9BUideqfzJksS_jDKhks5r2zSWgaJpZM4MMy6c>
.
|
@tannerlinsley this has stopped working in |
It would be useful to call the submit and validate methods of a form while in a different component outside of the
parent. Consider the scenario when you want to have your submit form button reside in a different component hierarchy then the form.Maybe it's already possible to do this?
Please let me know what you think, thanks.
The text was updated successfully, but these errors were encountered: