Skip to content
add_filter('nex_forms_email', 'customize_checkbox_values_in_email', 10, 3);
function customize_checkbox_values_in_email($email_body, $data, $settings) {
// Replace the checkbox field IDs with their corresponding values in the email body
$checkbox_values = array(
'00' => 'Townhouse',
'0' => 'House',
'55' => 'Apartment Block/High Rise',
'150' => 'Double Story House',
);
foreach ($checkbox_values as $id => $value) {
$email_body = str_replace("$id==", "$value==", $email_body);
}
return $email_body;
}