Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'the_content', function() {
- //Replace the number with the page ID to display entries on
- if ( is_page('2' ) ) {
- require_once( CFCORE_PATH . 'classes/admin.php' );
- //Be sure to set the correct form ID below
- $form_id = 'CF5a5e8452c6f82';
- //get all entires (page 1 with 9999999 entries per page should do it:)
- $data = Caldera_Forms_Admin::get_entries( $form_id, 1, 9999999 );
- //$data has extra meta info. $entries has just the entries
- $entries = $data[ 'entries' ];
- foreach( $entries as $entry ) {
- echo '<div class="mydata">
- <span>' . $entry['data']['first_name'] . '</span>
- <span>' . $entry['data']['last_name'] . '</span>
- <span>' . $entry['data']['email_address'] . '</span>
- </div>';
- }
- }
- });
Add Comment
Please, Sign In to add comment