Skip to main content

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 true or false value depending on if viewer prompt is enabled.

Return Value: Boolean

Code Example

    digideckCore.viewerPromptService.isViewerPromptEnabled();

onShowViewerPrompt(callback)

Description

  • Subscribes to the event showViewerPrompt on the deck node.

Return Value: null

Options:

  • callback: Function The 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 viewerDataFormSubmit on the deck node.

Return Value: null

Options:

  • callback: Function The 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 closeViewerPrompt on the deck node.

Return Value: null

Options:

  • callback: Function The callback when viewer prompt is closed.

Code Example

    digideckCore.viewerPromptService.onViewerPromptClose(callback);

onViewerPromptSkip(callback)

Description

  • Subscribes to the event viewerDataFormSkipped on the deck node.

Return Value: null

Options:

  • callback: Function The callback when viewer prompt is skipped.

Code Example

    digideckCore.viewerPromptService.onViewerPromptSkip(callback);

offShowViewerPrompt(callback)

Description

  • Unsubscribes from the event showViewerPrompt on the deck node.

Return Value: null

Options:

  • callback: Function this 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 viewerDataFormSubmit on the deck node.

Return Value: null

Options:

  • callback: Function this 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 closeViewerPrompt on the deck node.

Return Value: null

Options:

  • callback: Function this 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 viewerDataFormSkipped on the deck node.

Return Value: null

Options:

  • callback: Function this callback is the reference to the subscription and is used to unsubscribe.

Code Example

    digideckCore.viewerPromptService.offViewerPromptSkip(callback);