Answer the question
In order to leave comments, you need to log in
How to programmatically submit a redux form?
There is this form:
<form ref="myform" onSubmit={handleSubmit(this.handleFormSubmit.bind(this))}>
...
</form>
Answer the question
In order to leave comments, you need to log in
It turned out to do this:
onSomeClick() {
const {store} = this.context;
const state = store.getState();
let data = getFormValues('form-id')(state);
this.handleFormSubmit(data);
}
static contextTypes = {store: PropTypes.object};
Try
<form ref="myform" onSubmit={() => this.handleSubmit}>
...
</form>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question