Generate the sharing screen
You can generate the ReferralHero Dashboard Widget Sharing Screen manually by calling:
This function will return an HTML element. To display the sharing screen on your page, simply append it to another element on your page. For example, you can append the sharing screen to a div on your page like this:
You can see a live example here: https://codepen.io/Manu66/pen/eYYqPVz
When to generate the sharing screen
Generating the sharing screen manually can be useful in circumstances where you want to display the sharing screen in a specific place or upon a specific user behavior (like a click).
However, be aware that you can only generate the sharing screen when the subscriber has been identified. Attempts to generate the sharing screen without a subscriber will fail.
Display sharing screen in a popup
If you want to display the sharing screen in a popup simply call:
For example, if you want to trigger the popup when a button is clicked, you can do something like this:
You can see a live example here: https://codepen.io/Manu66/pen/bGGXmKP
Last updated