Is there a way to loop through submitted form via code
-
$args = array(‘post_type’ => ‘wpcf7s’, ‘posts_per_page’ => 10);
$cf7Forms = get_posts( $args );
$post_ids = wp_list_pluck( $cf7Forms , ‘ID’ );
$form_titles = wp_list_pluck( $cf7Forms , ‘post_title’ );
$form_content = wp_list_pluck( $cf7Forms , ‘post_content’ );if ( have_posts() ) while( have_posts() ): the_post(); ?>
<?php var_dump( $form_content); ?><?php
endwhile;
wp_reset_query();
?>// the problem is, i want to loop through saved form the only thing i’m receiving is:
This e-mail was sent from a contact form on TestPlug (https://192.168.1.33)”
[0]=>
string(149) “From: [your-name]
Subject: [your-subject]Message Body:
[your-message]The page I need help with: [log in to see the link]
- The topic ‘Is there a way to loop through submitted form via code’ is closed to new replies.