Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active May 17, 2017 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shelob9/c2df0d6c9c459927d1d16f7934713b95 to your computer and use it in GitHub Desktop.
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/
<?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