How to get the most out of custom code blocks in Embeddables
# | Argument | Description |
---|---|---|
1 | userData | The current User Data |
2 | helperFunctions | An object containing various helper functions (see full list below) |
3 | triggerContext | An object containing data on what triggered the Computed Field or Action (see full list below) |
helperFunctions
argument:
goToNextPage()
goToPrevPage()
goToPage(pageKeyOrIdOrIndex: string | number)
getUserData()
setUserData(key: string, value: any)
setUserData(updates: Record<string, unknown>)
resetUserData()
getComponentElement(key: string)
value
for a password input field), or setting up custom event listeners.openInfoBox(infoBoxPageKey: string)
closeInfoBox()
triggerAction(actionId: string)
triggerValidation()
trackCustomEvent(customEventName: string, customEventProps: any)
helpers
old_user_data
and new_user_data
currently only
contain the input keys for the Computed Field, not all of User Data. This may
change in the future.