Sunday, August 29, 2010

Re: 2 user choosing fields in view

Just a thought...if your site is a HUGE portal, won't this select list become a little HUGE too?

Jeremy Burns
Class Outfit

jeremyburns@classoutfit.com
http://www.classoutfit.com

On 30 Aug 2010, at 05:41, Sam wrote:

> Something along the lines of....
>
> In controller:
> $recievers = $this->User->find('list', array('conditions' =>
> array('User.id NOT' => $this->Auth->User('id'))));
> $this->set('recievers', $recievers);
>
> in view:
> echo $html->input('reciever_id');
>
> On Aug 29, 5:23 am, Baker <prjan...@gmail.com> wrote:
>> Hello,
>>
>> I am building a huge portal using the CakePHP and now I stumbled upon
>> a problem.
>> I want one user to send message to another. So when I click Send
>> Message it opens up my view file send.ctp and I write title, message
>> and so on. But I also need to select user to which I am sending the
>> message.
>> In messages table I have receiver_id row in which I want to put
>> receiver's id.
>> I actually need a select box when I can select from other members
>> except from myself. Then, when I select his username his ID is put
>> into receiver_id so that later that user could read that message.
>>
>> I have been struggling with this for a while, so I need some help on
>> how to do this.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: