As of ~1-2 weeks ago, the following code was working fine. However, as of 3 days ago, it stopped working.
The lightbox will only close in preview mode but not in a published site.
This code is in a members section so you must be logged in to even see the lightbox in the first place.
import wixWindow from ‘wix-window’ ;
$w . onReady ( function () {
**const** data = wixWindow . lightbox . getContext ();
$w ( '#input5' ). value = data . zipCode ;
$w ( '#dropdown1' ). value = data . beds ;
$w ( '#input3' ). value = data . baths ;
$w ( '#input4' ). value = data . sqFt ;
$w ( '#addressInput1' ). value = data . address ;
$w ( '#button1' ). onClick (( event ) => {
wixWindow . lightbox . close ({
"lightBoxSend1" : $w ( '#input5' ). value ,
"lightBoxSend2" : $w ( '#dropdown1' ). value ,
"lightBoxSend3" : parseFloat ( $w ( '#input3' ). value ),
"lightBoxSend4" : parseInt ( $w ( '#input4' ). value ),
"lightBoxSend5" : $w ( '#addressInput1' ). value ,
"lightBoxSend6" : **true**
});
});
$w ( '#button3' ). onClick (( event ) => {
wixWindow . lightbox . close ({
"lightBoxSend6" : **false**
});
});
});