Guides
Guides

How to close the iframe after submitting feedback

This tutorial explores a use case where a user wants the iframe to close after submitting feedback. The code below shows how to close the iframe after a successful feedback submission by clicking the x in the UI. You must use the showClose parameter in the request URL for the code below to work.

var closeIFrame= function(event)
  {
     if (!event || event.data != "FeedbackWidgetClose")
         return;
     fifToggle();
  }

window.addEventListener("message", closeIFrame, false);