Configure time a message is displayed in ChronoForms 6

rcdiok 13 Sep, 2017
Hi,

I would like to know if it is possible to have the message disappear after a couple of seconds. I am working towards creating an form that will just update the database with what button is hit and then come back to that form. With the message I can confirm that the action was done on the screen, but that message stays there. I would like to build in a timeout for it to disappear after 20 seconds. I could not find any settings in the message component.

Is it possible?
Thanks
GreyHead 13 Sep, 2017
Hi rcdiok,

There is nothing built in to do this but I imagine that is could be done with a little JavaScript. See this StackOverFlow answer for one method.

Bob
rcdiok 14 Sep, 2017
1 Likes
Thanks Bob for setting me off to the right direction.

I ended up adding a custom code element before the message with the following code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<script>
$(document).ready(function(){
        $(".ui.info.message").fadeOut(2000);
});
</script>


Hope this will help others as well. Maybe for the next release to add a setting for fading out the message😉

Cheers
Onno
GreyHead 15 Sep, 2017
Hi Onno,

That looks OK - though you shouldn't need to load the jQuery library again. Joomla! (or ChronoForms) will have loaded a version already.

Bob
This topic is locked and no more replies can be posted.