FormMessage
class is used to create an interactive form message that can be sent via CometChat. It extends the InteractiveMessage
class from CometChat.
Name | Type | Description |
---|---|---|
receiverId | string | The ID of the receiver |
receiverType | string | The type of the receiver |
title | string | The title of the form |
formFields | Array<ElementEntity> | The fields of the form |
submitElement | ButtonElement | The submit button of the form |
FormMessage
class:
setGoalCompletionText()
method sets the goal completion text of the form.
fromJSON()
method creates an instance of FormMessage
from a provided JSON object.
FormMessage
:
FormMessage
class is created. The title, form fields, submit element, and goal completion text are retrieved, updated, and retrieved again. Then a new FormMessage
instance is made from a JSON object, and the title is retrieved and logged.