Re: setting options to add inputs

2010-08-23 Thread cricket
On Mon, Aug 23, 2010 at 11:39 AM, james livsey
 wrote:
> Hi Cricket,
>
> where do you declare that in the controller? So for example if the model
> with the displayField I need to rename is Media and the corresponding model
> is Host would i declare
>
> $this->Mdeia->Host->displayField = '...';

That would be for Host's $displayField, not Media's.


> in each function in the controllers?

If you want it to always be a certain value, you define it once in the
model. You'd change it from the controller only if it were a special
case.

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


Re: setting options to add inputs

2010-08-23 Thread james livsey
Hi Cricket,

where do you declare that in the controller? So for example if the model
with the displayField I need to rename is Media and the corresponding model
is Host would i declare

$this->Mdeia->Host->displayField = '...';

in each function in the controllers?

thanks for your help

On Fri, Aug 20, 2010 at 5:03 PM, cricket  wrote:

> On Fri, Aug 20, 2010 at 10:48 AM, james livsey
>  wrote:
> > Hi cricket,
> >
> > thanks for that. Yes thats the kind of thing im looking for but the
> fields i
> > need to use as the display field actually belong to another model. Is
> that
> > possible to declare in the model?
> > Like
> > $displayField = OtherModel.displayField;
> > ?
>
> $this->Model->OtherModel->displayField = '...';
>
> Or, you can define it in the other model if it's not going to be
> changing. The above is something you'd do if displayField needed to be
> changed in certain situations. If you don't need that put it in the
> class definition..
>
> 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+unsubscr...@googlegroups.comFor
>  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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setting options to add inputs

2010-08-20 Thread cricket
On Fri, Aug 20, 2010 at 10:48 AM, james livsey
 wrote:
> Hi cricket,
>
> thanks for that. Yes thats the kind of thing im looking for but the fields i
> need to use as the display field actually belong to another model. Is that
> possible to declare in the model?
> Like
>     $displayField = OtherModel.displayField;
> ?

$this->Model->OtherModel->displayField = '...';

Or, you can define it in the other model if it's not going to be
changing. The above is something you'd do if displayField needed to be
changed in certain situations. If you don't need that put it in the
class definition..

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


Re: setting options to add inputs

2010-08-20 Thread james livsey
Hi cricket,

thanks for that. Yes thats the kind of thing im looking for but the fields i
need to use as the display field actually belong to another model. Is that
possible to declare in the model?
Like
$displayField = OtherModel.displayField;
?

On Thu, Aug 19, 2010 at 5:10 PM, cricket  wrote:

> On Thu, Aug 19, 2010 at 10:38 AM, james 
> wrote:
> > In one of my add views there is a drop down that allows the user to
> > specify associated records via id fields. I was wondering if there was
> > a way to add exra info to this to make it more user friendly.
>
> Search for "cakephp displayfield". I think that's what you want.
>
> 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+unsubscr...@googlegroups.comFor
>  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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: setting options to add inputs

2010-08-19 Thread cricket
On Thu, Aug 19, 2010 at 10:38 AM, james  wrote:
> In one of my add views there is a drop down that allows the user to
> specify associated records via id fields. I was wondering if there was
> a way to add exra info to this to make it more user friendly.

Search for "cakephp displayfield". I think that's what you want.

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


setting options to add inputs

2010-08-19 Thread james
In one of my add views there is a drop down that allows the user to
specify associated records via id fields. I was wondering if there was
a way to add exra info to this to make it more user friendly.

thanks!

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