I try to made a terms and condition modal next to my register form on my wix website.
I have two custom dialogs #lightbox1 & #lightbox2. After user clicks REGISTER NOW (#button2) on #lightbox1 another custom popup dialog (#lightbox2) with some text and OK button should be shown. After user clicks ACCEPTER on this popup, the register should be confirmed.
That is the code i added :
$w.onReady(() => {
$w('#button2').on('click', function () {
$w("#lightbox2").show();
});
});
The problem is not recognize #lightbox2 and it throws me error :
"An element with the ID '#lightbox2' does not exist on this page. Select another element and view or edit its ID in the Properties & Events panel."
enter image description here enter image description here
Then, if a charitable soul wants to help me, I'll welcome him with open arms 😂.
Wix only allows one lightbox at a time to function, as an alternative approach you can add Wix Multi-State component inside the lightbox popup and switch the views with the help of code