Copy this code to your theme’s functions.php to manipulate the posted data by the visitor, update, add or remove fields and such.

There’s a lot that you can do with it!

add_filter( 'wpcf7_posted_data', 'compform_file_url', 10, 1 );
function compform_file_url($posted_data){
	
	// Add / update field with value
	$posted_data['new_field'] =  'new value';
	
	// Check if 'your-email' is [email protected]
	if ($posted_data['your-email']=='[email protected]')
	{
		//Remove the email field from the posted data
		unset($posted_data['your-email']);
	}
	
	return $posted_data;
}

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?