Last active
October 11, 2019 21:22
-
-
Save Shelob9/6677e981b974577d21b2a9e92bee62d8 to your computer and use it in GitHub Desktop.
JavaScript events that run when Caldera Forms conditional logic adds or removes fields See: https://calderaforms.com/doc/cf-state-cf-events-caldera-forms-javascript#cf-add
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Run JavaScript when a field is added using conditional logic | |
jQuery( document ).on( 'cf.add', function(){ | |
console.log('cf.add triggered' ); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Run JavaScript when a field is removed using conditional logic | |
jQuery( document ).on( 'cf.remove', function(){ | |
console.log('cf.remove triggered' ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why does the cf.add event fire twice when used as is above? For example, a single field is made visible on click, but the cf.add event still fires twice from the single click?