can you send a link or a screenshot?
Sorry - a screenshot of what? I am asking if there is a way to have a form lightbox close after a a submission. Right now the options are to either load a page or display “thank you” a message. I’d like to display the “thank you” message and then have the modal lightbox go away.
You can use Velo - Lightbox close().
https://www.wix.com/velo/reference/wix-window/lightbox-obj/close
Here is an example:
import wixWindow from 'wix-window';
export function submit_click(event) {
setTimeout(() => {
if ($w('#success_message_id').isVisible) {
wixWindow.lightbox.close();
}
}, 5000) //Set the time according to the time the message appears until it disappears.
}
Amazing. This works well.
1 Like