Re: Sort the content output in an edit/add page for belongsTo
Once in a while someone points you to something utterly life changing!
Jeremy, I cannot thank you enough.
On Apr 6, 11:30 am, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> http://book.cakephp.org/view/1064/order
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 6 Apr 2011, at 00:27, adam_g2000 wrote:
>
>
>
> > Hi Guys,
>
> > Can't wait until I can throw away my newbie card, but here it is
> > again. Something which is probably simply but looking through the cook
> > book and searching has pulled up nothing.
>
> > I've got a model called resources, part of which belongsTo
> > subcategories. In add/edit views I've used the following echo $this-
> >> Form->input('subcategory_id'); and it does exactly what I want
> > (almost) output a select with options of all the possible
> > subcategories.
>
> > However, the client has asked that this output (the subcategories) be
> > output alphabetically in this select, and I can't figure out how to do
> > it! I first looked for something in the helper, turned up blank, then
> > figured perhaps I need to add something to the two methods (add/edit)
> > in the controller. But what?
>
> > Can anybody shed some light, point me in the right direction please?
>
> > Thanks, Adam.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home