Displaying Caldera Form Entries
-
Hi,
I am trying to display entries from my caldera form into my website, using Insert PHP Snippet plugin. However, some of the fields don’t appear correctly (please see the link). I follow the steps from this docs: https://calderaforms.com/doc/get-entries-from-a-form/
But I made some changes because I want to show only some of the fields.Here is the snippet:
<?php
//in front-end admin class is not included
require_once( CFCORE_PATH . ‘classes/admin.php’ );//Be sure to set the correct form ID below
$form_id = ‘CF5a7542a03c256’;//get all entires (page 1 with 9999999 entries per page should do it:)
$data = Caldera_Forms_Admin::get_entries( $form_id, 1, 25 );//$data has extra meta info. $entries has just the entries
$entries = $data[ ‘entries’ ];echo ‘<table class=”list-permintaan”>’;
echo ‘<thead>’;
echo ‘<tr><td style=”width:70%;”><b>Detail Permintaan</b></td><td style=”width:30%;”><b>Tanggal </b></td></tr>’;
echo ‘</thead>’;
echo ‘<tbody>’;
foreach($entries as $entry) {
echo ‘<tr>’;
echo ‘<td class=”description”>’. nl2br($entry[‘data’][‘deskripsi’]) . ‘<br/><br/>Quantity: ‘ . $entry[‘data’][‘quantity’] . ‘</td>’;
echo ‘<td>’. $entry[‘_date’] . ‘</td>’;
echo ‘</tr>’;
}
echo ‘</tbody>’;
echo ‘</table>’;Thank you in advance.
Best regards,
AndreasThe page I need help with: [log in to see the link]
- The topic ‘Displaying Caldera Form Entries’ is closed to new replies.