【发布时间】:2019-02-17 11:05:33
【问题描述】:
如何获取带有占位符的下拉列表,其中显示“选择类别”作为默认选择?
以下代码未呈现占位符
$this->crud->addField([ // Select2
'label' => 'Category',
'type' => 'select2',
'name' => 'category_id', // the db column for the foreign key
'entity' => 'category',
'attribute' => 'name',
'attributes' => ['placeholder' => 'Select a category'],
.... ])
【问题讨论】:
标签: dropdown placeholder