Last active
May 17, 2017 20:46
-
-
Save Shelob9/c2df0d6c9c459927d1d16f7934713b95 to your computer and use it in GitHub Desktop.
Examples of how to customize the field value shown in Caldera Forms summary magic tag. See: https://calderaforms.com/doc/caldera_forms_magic_summary_field_value/
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 extra HTML to Caldera Forms summary magic tag field value | |
*/ | |
add_filter( 'caldera_forms_magic_summary_field_value', function( $field_value, $field, $form ){ | |
//change your field ID here | |
if( 'fld123456' === $field[ 'ID'] ){ | |
$field_value = '<em>' . $field_value . '</em>'; | |
} | |
return $field_value; | |
}, 10, 3 ); | |
/** | |
* Change Caldera Forms summary magic tag value | |
*/ | |
add_filter( 'caldera_forms_magic_summary_field_value', function( $field_value, $field, $form ){ | |
//change your field ID here | |
if( 'fld123456' === $field[ 'ID'] && 'paste' === $field_value ){ | |
$field_value = 'Apex Paste'; | |
} | |
return $field_value; | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment