有人可以帮我吗?
我正在尝试过滤表单字段" Switch"在列表视图中,
以下是fields.yaml:
fields:
support_riyadh:
label: Riyadh
span: left
type: switch
clm_support_riyadh:
label: 'No. of Nursing Support From Riyadh'
span: auto
trigger:
action: show
field: support_riyadh
condition: checked
type: text
在模型中调用的函数下面:
public function filterFields($fields, $context = null)
{ if ($this->value == 0)
{
$this->trigger->field->value = 0;
}
}
我得到了这个例外:
Indirect modification of overloaded property MOH\KPI\Models\NursingSupport::$trigger has no effect
E:\Xampp\htdocs\mohkpi\plugins\moh\kpi\models\NursingSupport.php line 54
我想从相应的表单字段中更改触发表单字段的值。
此致