form_template_ids, and any callbacks, then use the same client to start Form filling sessions. The SDK manages the iframe connection, validates template IDs, and delivers session callbacks and events for you.
In React, wrap your app with FormFillingProvider and render FormFilling when the clinician should see the interface. You do not pass a container element yourself; the component handles that.
Import
Create an instance
CreateSukiAuthManager first, then pass it to FormFillingClient. Sign-in must succeed before the Form filling interface can open.
JavaScript
In React, create
FormFillingClient inside useMemo or at module scope so you do not build a new client on every render.Constructor options
These are the settings you pass tonew FormFillingClient({ ... }) in JavaScript.
Start options
Callawait client.start({ ... }) when the clinician starts a Form filling session.
The SDK validates your form_template_ids, loads the Form filling interface, authenticates the session, and prepares it for use.
The start() method resolves when the session has been initialized. When the interface is fully loaded and ready for interaction, the onReady callback is called.
start() does not throw errors. Instead, handle errors with the onError callback or the form-filling:error event.
If you call start() again, the SDK automatically closes the current session and starts a new one. You do not need to call stop() first.
start() options
Refer to Configuration for container sizing andcorrelation_id details.
Methods and getters
In JavaScript, you can use the following methods and getters to manage the Form filling session.React bindings and components
In React, you can use the following components and provider to manage the Form filling session.FormFillingProvider
Wrap components that renderFormFilling or call useFormFilling(). Pass the same FormFillingClient instance you created in useMemo.
React
form-filling:error and exposes the latest error through useFormFilling().
FormFilling
RenderFormFilling when the clinician should see the Form filling interface. Mounting starts a session; unmounting calls client.stop().
Props match start() options, except you do not pass rootElement.
useFormFilling()
Call insideFormFillingProvider to read the client, session state, or the latest error from sibling components.
Code examples
The following example shows how to create a Form filling client, start a session, and handle the session events in JavaScript.Refer to JavaScript integration for a full step-by-step guide.
JavaScript
Next steps
Refer to Events forclient.on() payloads and lifecycle
Refer to Callbacks for onSubmit and FormFillingResult
Refer to Configuration for auth, container sizing, and correlation_id