Skip to main content
Question

How to create a pop-up modal on the community?

  • October 16, 2025
  • 3 replies
  • 42 views

Hi community, 

I’m looking for a way to create a temporary pop-up modal yet my html widget and css code only shows me a glimpse of the pop up I’ve tried to create only when I click to layout option in the control bar (?) 

Anyone who can help with the logic please? 


Thank you so much!

3 replies

DannyPancratz
Forum|alt.badge.img+9
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • October 16, 2025

I think you need to do that via Third Party Scripts. 

I did a pop up modal recently on our registration page and that’s where I put the script. 


atwhite
Forum|alt.badge.img+1
  • Helper ⭐️⭐️
  • October 17, 2025

We have done this with Third Party Scripts as well. For a while, we had a pop-up when someone had sat on one of our Product Documentation articles for longer than 10 seconds to ask if they were finding what they needed via an embedded Typeform. I think this is what we used (cleaned up with placeholders). 
 

<script>
// Wait for the DOM content to be fully loaded
document.addEventListener("DOMContentLoaded", function() {
// Use setTimeout to delay execution by [DELAY IN MILLISECONDS]
setTimeout(function() {
// Check if the breadcrumb element with the title "[PAGE OR SECTION NAME]" exists on the page
if (document.querySelector('[data-preact="widget-breadcrumb/Breadcrumb"][data-props*="[PAGE OR SECTION NAME]"]')) {
// If the breadcrumb exists, execute the code
var divElement = document.createElement('div');
// Add your custom embed attribute here (example shown for Typeform)
divElement.setAttribute('[EMBED-ATTRIBUTE-NAME]', '[YOUR-EMBED-ID]');
document.body.appendChild(divElement);

// Load your external script (example shown for Typeform)
var scriptElement = document.createElement('script');
scriptElement.src = '[EMBED-SCRIPT-URL]'; // e.g. https://embed.typeform.com/next/embed.js
document.body.appendChild(scriptElement);
}
}, [DELAY IN MILLISECONDS]); // Example: 10000 = 10 seconds
});
</script>

 


  • Author
  • Contributor ⭐️
  • October 17, 2025

Thank you so much! ​@DannyPancratz ​@atwhite