小编ter*_*omp的帖子

重力形式 api get_entries 限制为 20

这似乎是一个非常简单的问题,但无论我如何切片,即使 GFAPI::count_entries() 返回 52,Gravity Forms 也只显示 20 个条目。

这是代码:

$form_id=16; 
$search_criteria = array( 'status' => 'active' );
$total_entries = GFAPI::count_entries( $form_id, $search_criteria );
echo '<h3>Count of entries: '.$total_entries.'</h4>';
// shows: Count of entries: 52 as expected

// great, now process each entry and get specific fields
$paging = array( 'offset' => 0, 'page_size' => 60 );
$allentries = GFAPI::get_entries( $form_id, $paging );
echo '<h3>Count of entries: '.count($allentries).'</h4>';
// shows: Count of entries: 20

$entryid = 25; // known data item …
Run Code Online (Sandbox Code Playgroud)

wordpress plugins gravity-forms-plugin

2
推荐指数
1
解决办法
4257
查看次数

标签 统计

gravity-forms-plugin ×1

plugins ×1

wordpress ×1