cf7-1

← разместить еще код

Расшаренный код:

add_filter('wpcf7_posted_data', 'my_wpcf7_posted_data');
function my_wpcf7_posted_data($posted_data) {
    if ( isset( $posted_data['subjects'] ) ) {
		$form_url = get_permalink( 3166 ); // page with form
		$query = array(
			'your-name' => $posted_data['your-name'],
			'your-email' => $posted_data['your-email'],
			'subjects' => $posted_data['subjects'],
			'test_place' => $posted_data['test_place']
		);
        $posted_data['next_form_url'] = $form_url . '?' . http_build_query( $query );
    }
    return $posted_data;
}