onSubmit()
This event handler runs when a step of the form is submitted.
Overview
Usage
import { init, Form } from '@feathery/react';
function App() {
// Initialize Feathery
init('SDKKey', 'bob@feathery.io');
// Show the `aBcDeF` Feathery form
return <Form
formId='aBcDeF'
// Store form data in backend
onSubmit={(context) => {
writeToBackend(context.submitFields);
if (context.lastStep) console.log("User finished form!");
}}
/>
}Context API
Key
Type
Description
triggerData Object
Key
Type
Description
fieldData Definition
Key
Type
Description
fieldData example
Return value
Last updated
Was this helpful?