Skip to content

Instantly share code, notes, and snippets.

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/042d46f770b09efaf98330a97824cb37 to your computer and use it in GitHub Desktop.
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/
<?php
add_filter( 'caldera_forms_magic_summary_should_use_label', '__return_true' );
<?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 );
<?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