• Resolved pepe80

    (@pepe80)


    Hi,

    CF7 ver. 5.1.7

    add_action('wpcf7_posted_data', 'action_wpcf7_posted_data', 10, 1);
    function action_wpcf7_posted_data($array) {
      isset( $array['_wpcf7_container_post'] ) // true
    }
    

    CF7 ver. 5.2

    add_action('wpcf7_posted_data', 'action_wpcf7_posted_data', 10, 1);
    function action_wpcf7_posted_data($array) {
      isset( $array['_wpcf7_container_post'] ) // false
    }
    

    Why?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter pepe80

    (@pepe80)

    Thank you for your answer. How should I modify or add input value in wpcf7_posted_data action? In this way?

    add_action('wpcf7_posted_data', 'action_wpcf7_posted_data', 10, 1);
    function action_wpcf7_posted_data($array) {
      $array['email'] = $_POST['email'] = trim($_POST['email']);
      $array['new_input'] = $_POST['new_input'] = 'some text';
      return $array;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Why _wpcf7_container_post is empty in wpcf7_posted_data?’ is closed to new replies.