Viewer Prompt Service
The Viewer Prompt Service provides a way to subscribe and unsubscribe from the presentation's contact form.
Methods
getViewerPromptData()
Description
- Returns viewer prompt data if form was filled out.
Return Value: Object
Code Example
const viewerPromptData = digideckCore.viewerPromptService.getViewerPromptData();
console.log(`Hello, ${viewerPromptData.firstName} ${viewerPromptData.lastName}. Email: ${viewerPromptData.email}`);
isViewerPromptEnabled()
Description
- Returns a
trueorfalsevalue depending on if viewer prompt is enabled.
Return Value: Boolean
Code Example
digideckCore.viewerPromptService.isViewerPromptEnabled();
onShowViewerPrompt(callback)
Description
- Subscribes to the event
showViewerPrompton the deck node.
Return Value: null
Options:
callback: FunctionThe callback is invoked when the viewer prompt is shown. passing the callback a jQuery Event Object
Code Example
digideckCore.viewerPromptService.onShowViewerPrompt(callback);
onViewerPromptSubmit(callback)
Description
- Subscribes to the event
viewerDataFormSubmiton the deck node.
Return Value: null
Options:
callback: FunctionThe callback is invoked when viewer prompt is submitted. Passes the viewer form data as key value pairs of the input label and input value.
Code Example
digideckCore.viewerPromptService.onViewerPromptSubmit(callback);
onViewerPromptClose(callback)
Description
- Subscribes to the event
closeViewerPrompton the deck node.
Return Value: null
Options:
callback: FunctionThe callback when viewer prompt is closed.
Code Example
digideckCore.viewerPromptService.onViewerPromptClose(callback);
onViewerPromptSkip(callback)
Description
- Subscribes to the event
viewerDataFormSkippedon the deck node.
Return Value: null
Options:
callback: FunctionThe callback when viewer prompt is skipped.
Code Example
digideckCore.viewerPromptService.onViewerPromptSkip(callback);
offShowViewerPrompt(callback)
Description
- Unsubscribes from the event
showViewerPrompton the deck node.
Return Value: null
Options:
callback: Functionthis callback is the reference to the subscription and is used to unsubscribe.
Code Example
digideckCore.viewerPromptService.offShowViewerPrompt(callback);
offViewerPromptSubmit(callback)
Description
- Unsubscribes from the event
viewerDataFormSubmiton the deck node.
Return Value: null
Options:
callback: Functionthis callback is the reference to the subscription and is used to unsubscribe.
Code Example
digideckCore.viewerPromptService.offViewerPromptSubmit(callback);
offViewerPromptClose(callback)
Description
- Unsubscribes from the event
closeViewerPrompton the deck node.
Return Value: null
Options:
callback: Functionthis callback is the reference to the subscription and is used to unsubscribe.
Code Example
digideckCore.viewerPromptService.offViewerPromptClose(callback);
offViewerPromptSkip(callback)
Description
- Unsubscribes from the event
viewerDataFormSkippedon the deck node.
Return Value: null
Options:
callback: Functionthis callback is the reference to the subscription and is used to unsubscribe.
Code Example
digideckCore.viewerPromptService.offViewerPromptSkip(callback);