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?

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().

Here is an example:

import wixWindow from 'wix-window';

export function submit_click(event) {
    setTimeout(() => {
      if ($w('#success_message_id').isVisible) {
    }, 5000) //Set the time according to the time the message appears until it disappears.

Amazing. This works well.

1 Like