Title: Changing Posted Data
Last modified: December 16, 2019

---

# Changing Posted Data

 *  [ionian](https://wordpress.org/support/users/ionian/)
 * (@ionian)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/changing-posted-data/)
 * Hi, I have successfully been able to access the posted data by using:
 * function check_number_form_elements($cf7)
    { wpcf7_before_send_mail and $submission
   = WPCF7_Submission::get_instance(); if($submission) { $posted_data = $submission-
   >get_posted_data();
 * But I want to change some of the data before it is sent elsewhere.
 * I have tried this:
    $posted_data[‘first-name’] = “James”;
 * return $cf7;
 * But this does not work.
    Am I missing something?
 * Thanks for any help you can give.
    Ian

The topic ‘Changing Posted Data’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ionian](https://wordpress.org/support/users/ionian/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/changing-posted-data/)
 * Status: not resolved