2016-10-06 21 views

回答

1

跑道不存儲webform中字段的順序。該訂單將始終與應用中的字段順序相匹配。

所以,如果在應用程序,我們有字段:text1text2category1category2
而在網絡表單,只有某些領域是有效的:text1category2

然後代碼:

$webForm = PodioForm::get($form_id); 
$fields = $webForm->fields; 

只會返回text1category2字段(以任何順序)。


如果你想顯示在相同的順序將網頁表單字段做,那麼你需要閱讀應用程序設置,並從應用領域的列表,並從現場的config注意delta設置。

描述爲delta設置是在這裏:https://developers.podio.com/doc/applications/get-app-22349

"delta": An integer indicating the order of the field compared to other fields 
0

我花了5分鐘,以找到答案在文檔:) http://podio.github.io/podio-php/items/

排序項

您可以按各種屬性的項目。 See a full list in the API reference

// Sort by last edit date for the items, descending 
$collection = PodioItem::filter(123, array(
    'sort_by' => 'last_edit_on', 
    'sort_desc' => true 
)); 
+0

其實,我試圖找到PodioForm領域,而不是波迪奧項目字段:) –