Great new feature: fading of success message after some seconds

I have a form and below the form a table component.
Adding is simple and you get a success message: great!
The table updates itself, so no manual reload necessary: even better!

But if you want to add other points to the list, it is not clear whether it was already saved or not because the success message does not vanish.

Could you make a vanish/fade action for the success message?

I mean the green message in below example:

Example:

Thanks

Very interesting request. I can see the use case and we’ll discuss internally.

For now, if you want something you can implement right away, you can do the following code in the footer of your app.

<script>
    function waitForElm(selector) {
    return new Promise(resolve => {
        if (document.querySelector(selector)) {
            return resolve(document.querySelector(selector));
        }

        const observer = new MutationObserver(mutations => {
            if (document.querySelector(selector)) {
                resolve(document.querySelector(selector));
                observer.disconnect();
            }
        });

        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
}

waitForElm('.form-process-message').then((elm) => {
  $('.form-process-message').delay(5000).fadeOut('slow');
});
</script>

If you want to only have this happen on specific pages, remove the last 3 lines from here and put it in the Javascript of the pages you wish for this to be triggered on.

Source

Alas - it didn’t work for me. Could it because this is on a popup page? @Moe

Can you share some screenshots of where you pasted the code?

I also tried it all on the concerned page only, and third option was what you adviced before: so the upper part in the footer and the bottom 3 lines in the Javascript of the page (without the script tags)

I just tested in several places as well and was working fine me.

Anything show up in the console?

If you wish feel free to share the app with me and email me the specifics of where you’re trying to make it work, I’d be happy to take a look

I tried a personal message here, but it was the first time. Did it work?

I tried this as well on both a regular page and a modal window…it did not work for me either.

We have now added this feature in submit rules.

1 Like

Thanks, works flawlessly.

Might I suggest an addition to the text: “Auto hide notification after x seconds”.
That would make it a bit clearer, what this is.

Solid point. Wil do.

it’s 10 seconds btw.