How to 'unlock' a field in a CakePHP form when it is part of a hasMany association

后端 未结 2 1752
难免孤独
难免孤独 2021-01-21 21:40

I have a form that represents a RewardModifier table in our database. That RewardModifier hasMany RewardOption.

My fo

2条回答
  •  -上瘾入骨i
    2021-01-21 21:53

    I had a similar problem. I found adding (the equivalent of) this to the RewardModifier controller did the trick:

    public function beforeFilter(){
         $this->Security->unlockedFields = array('RewardOption');
    }
    

提交回复
热议问题