I am new to Editor X and Javascript. I am doing the front end tutorial to get an understanding of Editor X. Doing the Lightbox section but cannot get the popup to work when I click the submit button. Here is my code:
From the Main Page:
import wixWindow from ‘wix-window’ ;
import wixData from ‘wix-data’ ;
$w . onReady ( function () {
});
function submit ( ) {
$w ( ‘#movieSubmit’ ). onClick (() => {
let dataObj = {
“personalName” : $w ( “#addName” ). value ,
“movieName” : $w ( “#whatMovie” ). value
}
wixWindow . openLightbox ( ‘Popup’ , dataObj )
})
}
From the lightbox page:
import wixWindow from ‘wix-window’ ;
import wixData from ‘wix-data’ ;
$w . onReady ( function () {
let dataObj = wixWindow . lightbox . getContext ();
$w ( '#personalName' ). text = dataObj . personalName
$w ( '#movieName' ). text = dataObj . movieName
});
I have clearly missed something but cannot find it…