CakePHP error: Unexpected field 'contact' in POST data


#1

Hello there, CakePHP throws the following error when I submit a form: Unexpected field ‘contact’ in POST data. What could be causing this error? What did I do wrong and what should I do instead?
I figured that the error is being generated by this component: $this->loadComponent(‘Security’);


#2

Okay I have solved the problem. It was caused by custom fields that are not part of the Cake ORM Table field. Here’s what I did:
I just unlocked the custom field that I created ‘contact’, inside the view like so:
$this->Form->create();
$this->Form->unlockField('contact');
...