Thanks, that works.
But how do I access it in my controller when it is encoded as:
/icd_events/add/patientId:1
and not:
/icd_events/add/1
/Anders
On Oct 2, 11:09 am, "jitka (poLK)" <[EMAIL PROTECTED]> wrote:
> CONTROLLER:
>
> function add($patient_id = null) {
> if (empty($this->data)) {
> if (!empty($patient_id)) {
> $this->data['YourModelName']['patient_id'] = $patient_id;
> }
> } else {
> ...
> }
> ...
>
> }
>
> FORM:
> echo $form->create('YourModelName');
> echo $form->hidden('patient_id');
>
> LINK calling add() action for first time:
> echo $html->link('New record', array(
> 'controller' => 'your_controller',
> 'action' => 'add',
> 9999 // <- patient id passed as an argument to add() action
> ));
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---