Skip to content

Instantly share code, notes, and snippets.

@smartdeal
Last active May 8, 2018 15:54
Show Gist options
  • Save smartdeal/57b1af2f667a2468ba05e15e8e376b24 to your computer and use it in GitHub Desktop.
Save smartdeal/57b1af2f667a2468ba05e15e8e376b24 to your computer and use it in GitHub Desktop.
Contact form 7 - get fields in function.php #Wordpress #WP_CF7
<?php
$wpcf7 = WPCF7_ContactForm::get_current();
$submission = WPCF7_Submission::get_instance();
$data = $submission->get_posted_data();
$form_type = $data['form-type'];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment