Title: Stars
Last modified: December 28, 2020

---

# Stars

 *  Resolved [sousouch](https://wordpress.org/support/users/sousouch/)
 * (@sousouch)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/stars-3/)
 * Hi,
 * The stars disappear in modal, replaced by a drop-down list.
 * Do you know how to fix it?
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/stars-3/#post-13840723)
 * The Star Rating control in the review form is initialised on page load with javascript.
   If you are displaying the review form in a modal that is initialised after the
   [DOMContentLoaded](http://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event)
   page load event has been triggered, the the Star Rating control won’t be initialised.
 * To fix this, you will need to hook into the modal event that is triggered when
   the modal is displayed, and add this: `new GLSR.Forms();`.
 * You can see how this is done for Elementor Pro Popups here: [https://github.com/pryley/site-reviews/blob/9d63b8329a9ca856860bad5095898b00ff10a7f0/compatibility.php#L173-L184](https://github.com/pryley/site-reviews/blob/9d63b8329a9ca856860bad5095898b00ff10a7f0/compatibility.php#L173-L184)
 *  Thread Starter [sousouch](https://wordpress.org/support/users/sousouch/)
 * (@sousouch)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/stars-3/#post-13841060)
 * I have tried different things, but it doesn’t match.
 * I’m using [Wppostpopup](https://wordpress.org/plugins/wp-post-modal/).
 * Do you know how to adapt this code to this plug-in?
    -  This reply was modified 5 years, 4 months ago by [sousouch](https://wordpress.org/support/users/sousouch/).
 *  Plugin Author [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * (@geminilabs)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/stars-3/#post-13841114)
 * It doesn’t look like that plugin triggers any javascript event that you can hook
   into when a modal is opened/closed.
 * You could try adding a click event to the link that you click to open the modal,
   but this may not work if the content of the modal is loaded dynamically.
 * For example:
 *     ```
       var modalLink = document.querySelector('.modal-link');
       if (modalLink) {
           modalLink.addEventListener('click', function (ev) {
               setTimeout(function () { new GLSR.Form(); }, 2000); // triggered after a 2 second delay
           });
       }
       ```
   
 * You will need to contact the author of that plugin to ask how to trigger some
   custom javascript when the modal is opened.
    -  This reply was modified 5 years, 4 months ago by [Gemini Labs](https://wordpress.org/support/users/geminilabs/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Stars’ is closed to new replies.

 * ![](https://ps.w.org/site-reviews/assets/icon-256x256.gif?rev=3307009)
 * [Site Reviews](https://wordpress.org/plugins/site-reviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/site-reviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/site-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/site-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/site-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/site-reviews/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Gemini Labs](https://wordpress.org/support/users/geminilabs/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/stars-3/#post-13841114)
 * Status: resolved