I've just added a helper to the bakery for a country drop down list.
You could easily create your own method using the same code to also do
one for states.
Or if you want to have the list in your db, go with the generateList option.
Tane
On 3/13/07, rtconner <[EMAIL PROTECTED]> wrote:
>
> Hello, I have been using Cake for a week now. I have learned a lot,
> but still have a long way to go. I have a few questions still. Mostly
> I am trying to learn "the cake way" to do things so that I am flowing
> with the framework and not fighting against it.
>
> 1. I have a few global functions I use in some sites I make. Basically
> extending the PHP library (in concept). I would not think it is a wise
> thing to add to basics.php. Instead I am hoping there is some way to
> add to this within the application folder. Is this possible at all?
>
> 2. What is the best way to handle state and country dropdowns. I did
> find GeographyHelper. Is this how everyone does it? I would ideally
> want to create these dropdowns from a list in my database.
>
> 2a. Is there a way to cache data selected from my database, such as a
> list of State, which I know will never be changing (or at least it is
> a rare occurance).
>
> 3. (FormHelper) I have been using Cake 1.2 and FormHelper. I find
> myself doing things like this all of the time--
> <?
> foreach($clients as $client) $c[$client['Client']['id']] =
> $client['Client']['name'];
> echo $form->select('client_select', $c);
> ?>
> Is there a way to avoid that step of creating that array? Maybe just
> pass a Model and a the strings 'id' and 'name' to FormHelper. What
> would be the standard way to handle this?
>
> Thank you,
> Rob
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---