Guest User

Untitled

a guest
Feb 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <?php
  2. add_filter( 'the_content', function() {
  3. //Replace the number with the page ID to display entries on
  4. if ( is_page('2' ) ) {
  5. require_once( CFCORE_PATH . 'classes/admin.php' );
  6.  
  7. //Be sure to set the correct form ID below
  8. $form_id = 'CF5a5e8452c6f82';
  9.  
  10. //get all entires (page 1 with 9999999 entries per page should do it:)
  11. $data = Caldera_Forms_Admin::get_entries( $form_id, 1, 9999999 );
  12.  
  13. //$data has extra meta info. $entries has just the entries
  14. $entries = $data[ 'entries' ];
  15.  
  16. foreach( $entries as $entry ) {
  17.  
  18. echo '<div class="mydata">
  19. <span>' . $entry['data']['first_name'] . '</span>
  20. <span>' . $entry['data']['last_name'] . '</span>
  21. <span>' . $entry['data']['email_address'] . '</span>
  22. </div>';
  23.  
  24. }
  25.  
  26. }
  27.  
  28. });
Add Comment
Please, Sign In to add comment