Skip to main content

Class: Form

The Form Class allows you to create Rich and Dynamic Forms in your websites and applications Pre-integrated into Ciptex Race

Throughout this page, you will see formClient with a lowercase "f" and Form with an uppercase "F".

Form refers to the Form object provided by the SDK.

formClient represents an instance of a Form, created with the new keyword:

Instantiate a Form Client

A new instance of Form should be constructed by using the new keyword and passing the Config payload as the first argument.

Initiate a Basic Form Client

const formClient = new Form({
accountSid: "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
formId: "FIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
});

To see all of the possible properties, see the Config interface section.

Hierarchy

  • EventEmitter

    Form

Accessors

isSupported

get isSupported(): boolean

Returns if Form is Supported in the current Browser / Context

    console.info(formClient.isSupported)

Returns

boolean


ready

get ready(): boolean

Is the formClient ready?

    formClient.ready ? console.info("Ready") ? console.info("Not Ready")

Returns

boolean

Methods

init

init(Payload): Promise<void>

Init the Form Client

    await formClient.init({
formContainer: "Form"
});

Parameters

NameType
PayloadInitProps

Returns

Promise<void>