A database table for Event model has following fields:
user_id, name, title
in the Event add view the user is asked to insert the name, hours and minutes as following:
echo $this->Form->input('hours');
echo $this->Form->input('minutes');
echo $this->Form->input('name');
Now the name would be obviously stored as it should, but the problem occurs when I want to concacinate the hours and minutes inserted by user and store them into the DBs “title” field.
Any suggestions for how to achieve this?
use the model’s beforeSave function to add any fields you like. In this case a title is being injected
in Event.php