Skip to content

BeechCMS


BeechCMS / @beechcms/forms-react / UseBeechFormOptions

Interface: UseBeechFormOptions<TValues> ​

Extended by ​

Type Parameters ​

TValues ​

TValues extends Record<string, unknown> = Record<string, unknown>

Properties ​

apiKey? ​

optional apiKey?: string


baseUrl? ​

optional baseUrl?: string


clock? ​

optional clock?: object

Time source for the time-trap checks. Defaults to Date.now; inject one in tests instead of faking timers.

now() ​

now(): number

Returns ​

number


disableAntiBot? ​

optional disableAntiBot?: boolean


disableDraft? ​

optional disableDraft?: boolean


draftTtlMs? ​

optional draftTtlMs?: number

Idle time after which a stored draft is discarded. Defaults to 24 hours.


excludeFields? ​

optional excludeFields?: string[]


excludeFromDraft? ​

optional excludeFromDraft?: string[]

Field aliases never written to the local draft, on top of every branch classified above public.


honeypotField? ​

optional honeypotField?: string


includeFields? ​

optional includeFields?: string[]


initialValues? ​

optional initialValues?: Partial<TValues>


locale? ​

optional locale?: Locale


onError? ​

optional onError?: (error) => void

Parameters ​

error ​
details? ​

unknown

message ​

string

status ​

number

Returns ​

void


onSuccess? ​

optional onSuccess?: (result) => void

Parameters ​

result ​
data ​

TValues

id? ​

string

Returns ​

void


seed ​

seed: string | FormSeedSchema


translations? ​

optional translations?: Partial<FormTranslations>