add_filter('cred_body_notification_codes', 'cb_problema_placeholder', 10, 1); function cb_problema_placeholder($defaultPlaceHolders) { return array_merge($defaultPlaceHolders, array('%%Problema%%' => $_REQUEST['Problema'])); }
Add this code to your theme’s functions.php file. This code actually does followings:
– Adds ‘cred_body_notification_codes’ filter to the filters queue. This filter is defined by CRED to render default placeholders.
– It takes a parameter and passes the array of existing placeholders (defined by CRED).
– All we need to add our own %%Problema%% placeholder and render it accordingly. This what it does within the callback function ‘cb_problema_placeholder’.
– During this addition, it grabs the generic field’s value from standard $_REQUEST super global array.
You can do the same with Subject Field also. Remember to use ‘cred_subject_notification_codes’ filter, just like below.