frm_display_entries_content

Back to Top
Knowledge BaseDisplay Data → frm_display_entries_content

Use this hook to customize content in your View.

Usage

add_filter('frm_display_entries_content', 'frm_custom_content', 20, 4);

Parameters

  • $new_content (string)
  • $entries (array of entry IDs)
  • $shortcodes (array of shortcodes used in View)
  • $display (object)

Examples

Formidable Hook - Helpful

Basic Format

Submitted by  — 8 years ago

add_filter('frm_display_entries_content', 'frm_replace_content', 20, 4);
function frm_replace_content($new_content, $entries, $shortcodes, $display){
if($display->ID == 1066){//Replace 1066 with the ID of your View
 $new_content = "Your custom content here";
}
  return $new_content;
}
Formidable Hook - Helpful

Add result counts with page size of 1

Submitted by  — 8 years ago

add_filter('frm_display_entry_content', 'frm_filter_content', 20, 7);
function frm_filter_content($content, $entry, $shortcodes, $display, $show, $odd, $atts) {
  if ( isset($atts['pagination']) && $atts['count'] == 1 && $display->ID == 100 ) { //change 100 to your display ID
    $content = 'Viewing Project 1 to ' . $atts['total_count'] .' (of ' . $atts['record_count'] .' Projects)' . $atts['pagination'] . '' . $content;
  }
  return $content;
}
If you would like to add your own example, click here.

Have something to add?

Click here to provide feedback on this page.