未在數據庫中插入多選值。
我fields.yaml代碼是:
related_recipe:
label: 'Related Recipe'
span: auto
nameFrom: recipe_title
descriptionFrom: description
attributes: {multiple:'multiple'}
type: relation
我的模型代碼是:
public $belongsTo = [
'related_recipe' => [
'Qdata\Taeq\Models\Recipe',
'conditions' => 'status = 1'
],
];
目前只有一種插在database.need選擇的值在數據庫中添加多個值。任何人都可以解決它嗎?
試試這個.. http://stackoverflow.com/questions/35620124/october-cms-create-a-multi-select-form-field –
@VijayWilson我想設置數據使用類型=「關係」不是部分。 –