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 allows you to do something with the data entered in a form before it is updated.
Usage
add_filter('frm_update_entry', 'frm_updated_at'); function frm_updated_at( $new_values )
Parameters
- $new_values (array)
Examples
Prevent 'Updated-At' From Updating on CSV Import
By default, whenever a CSV file is imported and form entries are updated, the "updated-at" timestamp is updated as well. The example below can be used to prevent the "updated-at" timestamp from being updated.
add_filter('frm_update_entry', 'frm_updated_at');
function frm_updated_at( $new_values ){
if ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {
unset( $new_values['updated_at'] );
}
return $new_values;
}