Props
What gets submitted
The SDK posts JSON to the endpoint, keyed by fieldid. Only fields visible at submit time are sent (statements are skipped), and unanswered fields are sent as "". If the schema sets settings.source, it’s sent as _source.
Things to know
- CAPTCHA: the SDK doesn’t send a CAPTCHA token. If the form has a CAPTCHA secret set, every SDK submission fails with
CAPTCHA verification required. Use the honeypot or allowed origins instead. - Allowed origins: if the form restricts origins, pages on other origins can’t load the schema and the component shows its error state.
- Redirects: the form’s redirect URL is followed only when the thank-you screen is enabled, after its delay (default 3 seconds). Otherwise use
onComplete. - Enter key in conversational mode: each
Enteradvances exactly one question. Since 0.1.2 the shortcut only reacts while focus is inside the form (or on the page body, e.g. a statement screen), soEnterin another input on the host page is left alone. Versions up to 0.1.1 listened on the whole window; upgrade if you embed the form inline. Short forms inside a larger page usually still look better inmode="classic".
Schema settings & screens
These live on the schema (schema.settings, schema.welcomeScreen, schema.thankYouScreen), not on OSForm props.
settings
progressBarStyle, autoScrollToTop, and animationStyle are in the type but not implemented yet. Neither is the top-level steps array.
welcomeScreen
Shown before the first field when enabled: true.
thankYouScreen
Shown after a successful submission when enabled: true. Without it, the form shows “Thanks for your response!” and doesn’t redirect.
showSubmissionId is in the type but isn’t rendered yet.
FormSettings isn’t exported. If you need the type, derive it:
Theme merging
Top-leveltheme keys replace the schema’s. Nested objects aren’t merged: passing colors replaces the schema’s whole colors object, and any color you leave out falls back to the SDK default, not the schema’s value. Include every color you want to keep.