External Submit

Form with an external submit button using the form ID.

How It Works

  1. Pass an id prop – Assigns the ID to the underlying <form> element
  2. Connect external button – Use <Button form={id} type="submit"> anywhere on the page
  3. Auto-hide built-in button – When id is provided without submitLabel, the default button is hidden

You can also use submitRef for imperative control:

const submitRef = useRef<() => void>(null);

<FormBuilder.Single submitRef={submitRef} ... />

<Button onClick={() => submitRef.current?.()}>Submit</Button>

See the full API Reference for id, submitRef, and submitLabel props.

On this page