Thanks for posting up your results Dakapo. It took me a little while
to figure it all out but I think I've finally figured out a way to
implement a similar Select which saves its data to a session variable.
One thing I did want to mention which took me a little while to figure
out is that the definition of $this->data depends on how you name your
select tag. For example, mine is called 'BbxLanguage/lang_id' which is
the 'Model/field'. So then $this-data['BbxLanguage']['somelang_id']
would work. Just in case anyone was having trouble working through
your code.

On Jun 7, 7:12 pm, Dakapo <[EMAIL PROTECTED]> wrote:
> Thank you for your help!
> I solved the problem with a little chat in the cakephp irc-room.
>
> Now I have an idea of working with the forms. Your posting will help
> me with my next bigger forms.
>
> A keypoint for me was to know where I have to fill theSession-
> Variable with the data from my little select-form. In the IRC-Channel
> I learned the following:
>
> For global settings you can copy the app_controler.php and/or
> app_model.php from the cake- to the app-folder.
> Here you can add features that should be available to every section of
> your application, not only to one model.
>
> In my case my app/app_controler.php looks like the following now:
> class AppController extends Controller {
>         function beforeRender() {
>                 //Setting the Language of the page
>                 if ( $this->data[0]['language'] != '' ) {
>                         $language = $this->data[0]['language'];
>                         if ( $this->Session->read('Config.language') != 
> $language ) {
>                                 //Configure::write('Config.language', 
> $language);  Would also work
>                                 $this->Session->write('Config.language', 
> $language);
>                         }
>                 }
>
>                 $this->set('selected_language', $this->Session-
>
> >read('Config.language'));
>         }
> }
>
> Perhaps somebody else can need this.
>
> By the way: Your homepage looks very nice Rohman!
>
> Best regards
> Dakapo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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