Popup

The popup function displays a popup dyanmically.

Usage: F2FSDK.popup(workflow_id, hide_toggle=false)

Parameters:

  • workflow_id (required): The unique ID of the popup workflow, which can be obtained from the F2F dashboard.
    • Ensure the workflow is configured as a "Popup" type.
  • hide_toggle (optional): A boolean value that determines how the popup’s toggle functionality is handled.
    • false (default): The popup includes a built-in toggle for showing or hiding itself.
    • true: You manage the popup visibility manually by repeatedly calling the function to toggle its state.

How to Create a Popup Workflow:

  1. Navigate to the Workflows page (left sidebar).
  1. Click New Workflow.
  1. Select Visitor Popup as the workflow type and complete the setup.

Example Codes:

// Replace 'your_workflow_id' with the actual ID of your popup workflow
F2FSDK.popup("your_workflow_id");
// Toggle the popup manually
F2FSDK.popup("your_workflow_id", true); // Call once to show
F2FSDK.popup("your_workflow_id", true); // Call again to hide

When to use:

  • This is useful when the workflow popup is disabled (does not show on page load) but you want to trigger it manually.

Demo:

📽 HelpKit Note: Self-uploaded videos are supported on the HelpKit Professional plan. Please upgrade or use a third party video provider such as Youtube, Wistia or Vimeo.

Last updated on December 23, 2024