Suddenly (I did nothing) my Contact 7 forms (wordpress) stopped working properly.
My functions.php was working with the submitted data – affecting all my forms.
This is affecting 2 sites I manage and seemed to happen to both at same time.
add_action('wpcf7_before_send_mail', 'my_conversion');
function my_conversion($cf7)
{
$firstname = $cf7->posted_data["FirstName"];
}
The problem is that $cf7->posted_data[“FirstName”] is blank for some reason – no value. Yet my form has a field named FirstName.
Any ideas?
Suddenly my $cf7-posted_data is empty…even when I try and push the data to a session (I have sessions working on my wordpress sites) the value is empty…
If you have CF7 v3.9 the posted_data property is depreciated see below…