In cakephp 3 I got error Unexpected field in POST data. Actually that field is not in my table, but I want to use in controller.
The Security Component in CakePHP is not forgiving. If you want to allow a field thru that should not go thru the Security Component hashing process, you need to use the unlockedField method that comes with the FormHelper class as such:
$this->Form->unlockField('field');
If this does not work, you will need to provide us with the pertinent code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With