subscribeToForm
Subscribe to a form event by marker. 🔐 This method requires authorization.
Description
This method subscribes the current user to a form event identified by its marker, for a specific form data record. It returns a Promise that resolves to true if the subscription was successful, or an IError object if there was an issue.
Events.subscribeToForm(
marker*,
body*,
body.formDataId*,
body.status
);
Parameters schema
Schema
marker(required): string
Event marker
example: "form_marker"
body(required): ISubscribeFormEvent
Subscription body. Example: { formDataId: 123 }
body.formDataId(required): number
Form data identifier.
example: 123
body.status: string
Optional subscription status.
Examples
Minimal example
const response = await Events.subscribeToForm('form_marker', { formDataId: 123 });
Example response
true
Response schema
Schema: boolean
boolean: boolean
Returns true if the subscription was successful.
example: true