Using CakePHP 1.3.6
I'm using a login-less authentication via a unique value as an URL param, so that when an "invited" user accesses a supplied link, I know who they are, and set some user information in the Session.
On this page is a form, with a parent and related child models (hasMany, belongsTo, all that).
Each child model has an 'agent_id' field (FK to Agent model, which is loaded upon accessing the page) that needs to be populated with an ID previously loaded in the Session.
Do I have to create a hidden input field for "agent_id" next to every child model form element group, or is there an easier way?
Perhaps I can grab from the Session or something from within the Model/Behavior beforeValidate()
or some such? That would be ideal, but I'm not sure how.
Thanks!