Search...
getForm( )
Retrieves an event registration form (both the draft and published versions).
Syntax
function getForm(eventId: string): Promise<Form>
getForm Parameters
NAME
TYPE
DESCRIPTION
eventId
string
Event ID to which the form belongs.
Returns
Currently published event form. Published form is visible to site visitors.
Return Type:
Promise<
Form
>NAME
TYPE
DESCRIPTION
controls
Array<
InputControl
>Nested fields as an ordered list.
messages
FormMessages
Set of configured form messages.
Was this helpful?
getForm example
Copy Code
1import { forms } from 'wix-events.v2';23 async function getForm(eventId, options) {4 try {5 const result = await forms.getForm(eventId, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13