I have a location table with the following fields:
-------
id
name
location_id -- this is a parent location id
-------

I have a couple of questions about getting this to work the way I want
it to using scaffolding.

1- How can I set it up so the location_id select box on the form has a
default value of 0 - 'Top Level' without putting a 'Top Level' entry
in the table?

2- How can I get the select box to output in the following format?

-- Top Level --
Parent 1
Parent 1 :: Child 1-1
Parent 1 :: Child 1-2
Parent 2
Parent 2 :: Child 2-1
Parent 2 :: Child 2-2
Parent 2 :: Child 2-2 :: Subchild 2-2-1
etc.

where the tree is built in the order of the ids of the parents, then
the order of the idds of the children.

I can do this manually, but I'd like to know a 'Cake' way of doing it.

And if I must do this manually, how do I get it to play nice with the
$form->input method?  If I need to at all?

Thanks for your help.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to