fastadmin SelectPage field顯示多個字段


如果想要顯示多個字段需要在所需要查詢的控制器中添加
$selectpageFields = 'id,name';

html中

<input id="c-user_id" data-rule="required" 
data-source="user/index"
class="form-control selectpage"
name="row[user_id]" type="text" data-live-search="true"
data-field="phone" //搜索字段
data-params='{"custom[phone]":["notin","[null]"]}' //搜索條件
data-format-item=
"{phone} - {nickName}"  //顯示的內容 data-primary-key="user_id"      //選擇的主鍵 value="{$row.user_id|htmlentities}">

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM