This fixes APPLYFIELDEFFECTS so that it uses the correct value of each effect in the ON callbacks.
This was done by moving the ON callback creation into its own function so that the closure captured the current effect value as we iterated over the list.
Testing:
Setup a form's field effects with multiple effects, and verify they all work correctly
(e.g. an effect for a single field, but with different conditions, actions)
OR
Setup a form's data events to use APPLYFIELDEFFECTS, passing in a field effects object with multiple effects, and verify they all work
https://fulcrumapp.atlassian.net/browse/FLCRM-8695
This fixes APPLYFIELDEFFECTS so that it uses the correct value of each effect in the ON callbacks.
This was done by moving the ON callback creation into its own function so that the closure captured the current effect value as we iterated over the list.
Testing: