0

I made a form with a hidden field with the value of a email but the value email doesn't save in the database.

This is the form field:

echo $this->Form->hidden('emailadres', ['value' => 'email@example.com']);

When I read the array $this->request->data, I see the email in the array. The column in the database has the name 'emailadres'. This is the output of the array:

array(1) { ["Ticket"]=> array(9) { ["id"]=> string(2) "4872 ["emailadres"]=> string(24) "email@example.com" ["title"]=> string(5) "This is a title" ["department"]=> string(9) "department1" ["message"]=> string(32) "This is a message"} } 

does anyone know why this email field is not saving to the database?

Thanks!

SamHecquet
  • 1,818
  • 4
  • 19
  • 26

0 Answers0