Stop events

prevent ChronoForms events from firing on hidden or disabled fields.

Overview

Events continue to trigger even when form fields are hidden or disabled, causing excessive event firing during operations like record reloading.
Use custom JavaScript to manage field events, as CF currently lacks a built-in feature to toggle events on and off.

em emmexx 13 Dec, 2017
Is it possible to stop the events of an element? Or is there some unwritten rule about the behaviour of CF and CC for hidden or disabled elements with events?

Thank you
maxx
Max_admin Max_admin 15 Dec, 2017
Answer
Hi maxx,

How to "stop" them ?

If you need to disable the field events then it will need some custom javascript code call.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
em emmexx 15 Dec, 2017



How to "stop" them ?



I meant stop firing.


If you need to disable the field events then it will need some custom javascript code call.



I did something similar.

My question was a little bit more subtle: if a field is hidden or disabled and its value changes (by code), are its events fired anyway?
The answer seems to be yes but I'm not sure it's always the best thing to do.

In my project I reload records into the form and events are fired as fireworks, debugging is a mess and not knowing exactly what is the expected behaviour is not helpful.

Thank you
maxx
Max_admin Max_admin 17 Dec, 2017
Hi maxx,

I will try to add a new feature to switch the events on/off in a future update, but at the moment you can not do this, any solution will need some custom js code to modify the fields data on the page.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.