Re: forn create with ID

2012-10-03 Thread Jonathan Sundquist
Is that user id being held within a session object?  If it is why not place
a beforeInsert function within your message model and add the user id there
to the data being sent in?

On Wed, Oct 3, 2012 at 7:40 AM, jodator  wrote:

> this one will be more consistent with URL routing:
>
> Form->create('Message', array('action' => array('action'
> => 'compose', $user_obj['User']['id'] ))); ?>
>
> Same array syntax as for html->url();
>
>
> On Wednesday, October 3, 2012 12:26:06 PM UTC+2, Chris wrote:
>>
>> Thank you Marcus !! it works,
>> actually I have tried that, but couldn't think of that " / " right after
>> compose...
>>
>> Thanks again,...
>>
>>
>> On Wednesday, October 3, 2012 1:10:52 AM UTC-7, marco metal wrote:
>>>
>>> Hi Chris
>>>
>>> Try this
>>>
>>> Form->create('Message', array('action' =>
>>> 'compose/'.$user_obj['User']['**id'] )); ?>
>>>
>>>
>>>
>>>
>>>
>>> Enjoy,
>>>
>>> Marcus
>>>
>>  --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: forn create with ID

2012-10-03 Thread jodator
this one will be more consistent with URL routing:

Form->create('Message', array('action' => array('action' 
=> 'compose', $user_obj['User']['id'] ))); ?>

Same array syntax as for html->url();

On Wednesday, October 3, 2012 12:26:06 PM UTC+2, Chris wrote:
>
> Thank you Marcus !! it works, 
> actually I have tried that, but couldn't think of that " / " right after 
> compose... 
>
> Thanks again,... 
>
>
> On Wednesday, October 3, 2012 1:10:52 AM UTC-7, marco metal wrote:
>>
>> Hi Chris
>>
>> Try this 
>>
>> Form->create('Message', array('action' => 
>> 'compose/'.$user_obj['User']['id'] )); ?> 
>>
>>
>>
>>
>>
>> Enjoy,
>>
>> Marcus
>>
>

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: forn create with ID

2012-10-03 Thread Chris
Thank you Marcus !! it works, 
actually I have tried that, but couldn't think of that " / " right after 
compose... 

Thanks again,... 


On Wednesday, October 3, 2012 1:10:52 AM UTC-7, marco metal wrote:
>
> Hi Chris
>
> Try this 
>
> Form->create('Message', array('action' => 
> 'compose/'.$user_obj['User']['id'] )); ?> 
>
>
>
>
>
> Enjoy,
>
> Marcus
>

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: forn create with ID

2012-10-03 Thread Marcus James
Hi Chris

Try this

Form->create('Message', array('action' =>
'compose/'.$user_obj['User']['id'] )); ?>





Enjoy,

Marcus

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: forn create with ID

2012-10-03 Thread Tilen Majerle
use "url" key in array list for FormHelper::create() method and create url
u like with cake's paths :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/10/3 Chris 

> hi guys,...
> I want to create Form to submit in action 'compose' with "ID"
>  $user_obj['User']['id']
>
> where and how do I add   $user_obj['User']['id'] to,...?
>
> Form->create('Message', array('action' => 'compose'));
> ?>
>
> this is nowhere in the book 1.3 CAKE
>
> thanks
> chris
>
> --
> Like Us on FacekBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




forn create with ID

2012-10-03 Thread Chris
hi guys,... 
I want to create Form to submit in action 'compose' with "ID" 
 $user_obj['User']['id'] 

where and how do I add   $user_obj['User']['id'] to,...? 

Form->create('Message', array('action' => 'compose')); ?> 

this is nowhere in the book 1.3 CAKE

thanks 
chris

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.