Advertisement
EarthmanWeb

GForms show entries

Jun 11th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1.         // function to pull entries from one form
  2.         $inquiries = RGFormsModel::get_leads($form_id, '', 'DESC', $search, '0', $page_size='99999999');
  3.         if(is_array($inquiries)){
  4.            
  5.             // show # of inquiries?
  6.             if($atts['showcount']){
  7.                 $count = count($inquiries);
  8.                 if(!count)$count='0';
  9.                 $html = '<h4 class="inquiries_count" style="clear:both;"># of Inquiries: '.count($inquiries).'</h4>';
  10.             }
  11.            
  12.             // show full details?
  13.             if($atts['hidelist'])
  14.                 return $html;
  15.            
  16.            
  17.             $html .= "<ul class='inquiries_list'>\n";
  18.             // loop through all the returned results
  19.             foreach ($inquiries as $inquiry) {
  20.  
  21.                 $html .= "\t<li class='inquiries_row'>\n";
  22.                 $html .= $inquiry['date_created'].' - ';
  23.                 $html .= $inquiry[7].' - '; //name
  24.                 $html .= $inquiry[9].'<br/>'; //name
  25.                 $html .= '<blockquote>'.$inquiry[8].'</blockquote>'; //name
  26.                 $html .= "</li>\n";
  27.        
  28.             }
  29.         }
  30.         $html .= '</ul>';
  31.        
  32.         // return the html output from the shortcode
  33.         return $html;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement