EbitexFormProps
@ebitex/forms-sdk/react — the rendering half.
Nothing here takes an API key, deliberately: these components run in a respondent’s browser and
submit to the form’s own public, anonymous endpoint. Fetch the definition server-side with
createFormsClient from the root entry point and pass the result to <EbitexForm />.
Properties
Section titled “Properties”attribution?
Section titled “attribution?”
optionalattribution?:Attribution| (() =>Attribution|undefined)
Where the respondent came from, the tags of the link they followed (the utm_* values under their short names), sent with the submission so Audience can record it as their first touch.
A value, or a function asked at each submit. Defaults to the utm_source, utm_medium and utm_campaign of the page’s own address in a browser; pass your own to give a first touch you
kept from an earlier page (the component stores nothing), or () => undefined to send none. The text is untrusted and is cleaned again by the server.
className?
Section titled “className?”
optionalclassName?:string
consent?
Section titled “consent?”
optionalconsent?:ConsentOptions
Signals from your consent banner (and, by default, the browser’s Global Privacy Control and Do Not
Track settings). Without any, the organization’s default applies, which is denied until an Owner
changes it: the respondent is not recognised across visits. Update it as the respondent chooses; a
change to cmp: 'denied' drops the token at once.
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Injectable for tests and non-standard runtimes.
Parameters
Section titled “Parameters”RequestInfo | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
fieldComponents?
Section titled “fieldComponents?”
optionalfieldComponents?:FieldComponents
Replace the component used for one or more field types. Anything not overridden keeps its
default, so this is a per-field escape hatch rather than an all-or-nothing takeover — override
Input alone and your Choice fields still render normally.
form:
SdkForm
A form definition from createFormsClient(...).getForm(...), fetched on your server.
lookup?
Section titled “lookup?”
optionallookup?:LookupSource
Where a Lookup field searches its options. Defaults to the form’s own public lookup endpoint,
derived from submissionUrl, so an embedded form needs nothing here; pass one to route searches
through your own server or to fake them in a test.
onError?
Section titled “onError?”
optionalonError?: (error) =>void
Called when a submission request fails. Validation failures are shown inline and don’t call this.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
onSubmitted?
Section titled “onSubmitted?”
optionalonSubmitted?: (data) =>void
Called after a successful final submission.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
storage?
Section titled “storage?”
optionalstorage?:VisitorStorage
Where to keep the visitor token between visits. Optional, and the component never persists anything
itself: your adapter’s set is called only when the API reports that recognising the respondent is
granted, and remove whenever it is not. If you keep the token anywhere else, the same rule applies.
style?
Section titled “style?”
optionalstyle?:CSSProperties
visitor?
Section titled “visitor?”
optionalvisitor?:VisitorSession
An existing session from createVisitorSession, to share one token across several forms on a page or to
call forget from your own UI. When given, consent and storage here are ignored.