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 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 can be used to manipulate or add a value to your .csv file.
Usage
add_filter('frm_csv_value', 'frm_csv_value', 10, 2); function frm_csv_value($value, $atts)
Parameters
- $value (string)
- $atts (array)
Examples
Add a Value to Your CSV File
You can use this code to add a value into your .csv file upon export.
add_filter('frm_csv_value', 'frm_csv_value', 10, 2);
function frm_csv_value($value, $atts){
if($atts['field']->id == 25){ //change 25 to your field id
$value = 'new value here';
}
return $value;
}