Last active
December 12, 2016 21:35
-
-
Save Shelob9/042d46f770b09efaf98330a97824cb37 to your computer and use it in GitHub Desktop.
Show Caldera Forms field label instead of value (for single-option select fields) in {summary} magic tag for email notification See: https://calderaforms.com/doc/caldera_forms_magic_summary_should_use_label/
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
<?php | |
add_filter( 'caldera_forms_magic_summary_should_use_label', '__return_true' ); |
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
<?php | |
add_filter( 'caldera_forms_magic_summary_should_use_label', function( $use, $field ){ | |
//Update for your field ID | |
if( 'fld_1111' == $field[ 'ID' ] ){ | |
return true; | |
} | |
return $use; | |
}, 10, 2 ); |
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
<?php | |
add_filter( 'caldera_forms_magic_summary_should_use_label', function( $use, $field, $form ){ | |
//update for your form ID | |
if( 'cf132556' == $form[ 'ID' ] ){ | |
return true; | |
} | |
return $use; | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment