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', '[email protected]');
// 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
triggerData ObjectKey
Type
Description
fieldData Definition
fieldData Definition Key
Type
Description
fieldData example
fieldData exampleReturn value
Last updated
Was this helpful?