Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

frm_email_value

Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

—This hook has been removed from Formidable as of version 6.23.—

Use frm_display_[field type]_value_custom hook instead

Change or format a value in the email notification before sending. This allows you to modify specific values in the email notification without modifying the entire email message.

Usage

add_filter('frm_email_value', 'frm_email_val', 15, 3);
function frm_email_val($value, $meta, $entry)

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Parameters

  • $value (string or array)
  • $meta (object)
  • $entry (object)

Examples

Change a value in an email

Use this code to format a field value or change the field value that displays in the email notification.

add_filter('frm_email_value', 'frm_email_val', 15, 3);
function frm_email_val($value, $meta, $entry){
if($meta->field_id == 25){ //change 25 to the ID of your field
$value = "My custom email content"; //change the value here
}
return $value;
}

Replace ampersand character reference

Use the code below to replace an ampersand character reference with a plain ampersand. Replace 25 with the ID of the field you want to modify.

add_filter( 'frm_email_value', 'frm_replace_ampersand', 15, 3);
function frm_replace_ampersand( $value, $meta, $entry ){
if ( $meta->field_id == 25 ) { //change 25 to the ID of your field
$value = str_replace("&","&",$value);
}
return $value;
}
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms