Community X.

Connect with other creators, share ideas, give feedback and get the latest product updates.

Feb 8

After a user submits their email on the mailing list Lightbox and "thank you" appears, is there a way to have the Lightbox auto-close?

3 answers1 reply
1
Best Answer
Feb 9

You can use Velo - Lightbox close(). https://www.wix.com/velo/reference/wix-window/lightbox-obj/close Here is an example:

Kapture 2021-02-10 at 01.27.13
.mp4
Download MP4 • 12.75MB


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.
}

Feb 10

Amazing. This works well.

1
Feb 8

can you send a link or a screenshot?

1
Feb 9

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.

Editor X

Design your boldest creations.