Hello using the code below I was able to successfully add row counter to my view.
add_filter('frm_display_entry_content', 'frm_get_row_num', 20, 7); function frm_get_row_num($new_content, $entry, $shortcodes, $display, $show, $odd, $atts){ if ( $display->ID == 169 ) { if ( isset($_GET['frm-page-' . $display->ID]) ) { $page_num = absint( $_GET['frm-page-' . $display->ID] ); $page_size = $display->frm_page_size; $prev_total = ($page_num - 1) * $page_size; $current_count = $atts['count'] + $prev_total; $new_content = str_replace('[row_num]', $current_count, $new_content); } else { $new_content = str_replace('[row_num]', $atts['count'], $new_content); } } return $new_content; }
By default he numbers go from 1-10 for example, how do I invert the counter to show 10-1? Thanks
Thanks for the response,
When doing this "Sort Entries" only the entries change not the row # I have tried this.
Descending entries goes to the top of the list but row# still reads 1.
Wait, you mean you want the row numbers to change dynamically when you sort them?
Yes
Either that or sort in descending order and just have the row numbers fixed in descending order for right now until we come up with a better solution.
Hey Rob Thanks this is no longer needed I figured out a different solution.
Please login or Register to submit your answer