{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/908","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/908/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/908/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/908/events","html_url":"https://github.com/erikras/redux-form/issues/908","id":153055709,"number":908,"title":"Submit with a redux action (v5 & v6)","user":{"login":"clayne11","id":2831444,"avatar_url":"https://avatars.githubusercontent.com/u/2831444?v=3","gravatar_id":"","url":"https://api.github.com/users/clayne11","html_url":"https://github.com/clayne11","followers_url":"https://api.github.com/users/clayne11/followers","following_url":"https://api.github.com/users/clayne11/following{/other_user}","gists_url":"https://api.github.com/users/clayne11/gists{/gist_id}","starred_url":"https://api.github.com/users/clayne11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clayne11/subscriptions","organizations_url":"https://api.github.com/users/clayne11/orgs","repos_url":"https://api.github.com/users/clayne11/repos","events_url":"https://api.github.com/users/clayne11/events{/privacy}","received_events_url":"https://api.github.com/users/clayne11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/erikras/redux-form/labels/discussion","name":"discussion","color":"5319e7"},{"url":"https://api.github.com/repos/erikras/redux-form/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-05-04T16:22:23Z","updated_at":"2016-05-16T20:21:09Z","closed_at":null,"body":"The docs talk about submitting from a parent, but that requires having a ref to the form. I'm finding myself more and more with multiple containers wrapping around some of my components as HOCs. This means having refs to a form instance is often pretty ugly and hacky and relies on implementation details of the UI which I don't believe it should have to.\r\n\r\nThere's currently no method for calling `handleSubmit` from a redux action. If there was, you could submit the form from anywhere in the app by simply firing a redux action and you don't have to worry about the implementation of the UI.\r\n\r\nAn example of where this is very valuable:\r\n\r\nI have a form which I use in multiple different locations. In one of the locations, there are \"forward / back\" buttons at the bottom of the page. The forward button should submit the form (if it is valid) and move on the to the \"next\" page. If the form is not valid, however, I don't want to move on to the next page.\r\n\r\nCurrently I don't see a way to do this through redux. Since the \"forward / back\" buttons aren't part of the form itself, but actually part of the form's container, and since the form might have data fetching containers (or other HOCs) around it, I can't directly access it with a ref to call `submit()`. There's also no way that I can see to tell if the form is valid (or pass down async validation errors) without calling `handleSubmit`.\r\n\r\nUsing a redux action seems like a much cleaner solution to me than using `ref`."},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/219535714","html_url":"https://github.com/erikras/redux-form/issues/908#issuecomment-219535714","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/908","id":219535714,"user":{"login":"clayne11","id":2831444,"avatar_url":"https://avatars.githubusercontent.com/u/2831444?v=3","gravatar_id":"","url":"https://api.github.com/users/clayne11","html_url":"https://github.com/clayne11","followers_url":"https://api.github.com/users/clayne11/followers","following_url":"https://api.github.com/users/clayne11/following{/other_user}","gists_url":"https://api.github.com/users/clayne11/gists{/gist_id}","starred_url":"https://api.github.com/users/clayne11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clayne11/subscriptions","organizations_url":"https://api.github.com/users/clayne11/orgs","repos_url":"https://api.github.com/users/clayne11/repos","events_url":"https://api.github.com/users/clayne11/events{/privacy}","received_events_url":"https://api.github.com/users/clayne11/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T20:21:09Z","updated_at":"2016-05-16T20:21:09Z","body":"Can you have a look at my PR for the field registration when you get a minute? From my end I think it's ready to go so if you have feedback I'd like to get that going. It can be pulled in on it's own and moving the `syncErrors` into the store will be a separate PR.\r\n\r\nI don't mean to bug you but I do see that you've been quite active today so I was just hoping we could move this along."}}