action
Specification
Action performed on the successful submit of the form.
This function is called only when the form is valid.
Definition
Parameters
Parameter name
Type
Description
serialized
Object
Serialized fields of the form.
fields
Object
Reference to all fields.
form
Object
Form component reference.
action
function must always return a Promise.
Example
Simple example
You can use onSerialize
form prop to transform the serialized fields object prior to accepting them in the action
handler.
Example with Redux
You need to use a dedicated Redux middleware for the actions to return a Promise (i.e. redux-thunk
or redux-saga
).
Last updated