Improvement to Lightbox setup and documentation

There is a bit of disconnect between the Help Center information on Lightboxes and the API documentation.

In the Help Center, the documentation shows how to close a Lightbox with an “X” graphic or a button. What is does not say is that if you select the button option, that button cannot be used to execute any code (like passing back data) when clicked in the Lightbox – it closes the Lightbox immediately.

The API documentation makes an obscure reference to closing the Lightbox “programmatically,” but that info is under wixWindow.openLightbox(), not under wixWindow.lightbox.close(). Regardless, the documentation between the Help Center and the API Reference should be consistent with one another.

1 Like

Hey @davebogan98 ,

Thanks for the feedback. We’ll update the API Reference to make it more clear in both places that data is only sent when the lightbox is closed using the close() function.

Thanks!