Re: $form->input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes <[EMAIL PROTECTED]>: > Hey, I'm not saying you're wrong. I'm just wondering why my method > seems to work okay for me, and I'm using the latest bleeding-edge > version of Cake 1.2.x.x. I just tried bleeding edge Cake (r5676 of the 1.2.x.x branch). Still the same result -

Re: $form->input() syntax for associations not following Cake conventions

2007-09-20 Thread Chris Hartjes
On 9/20/07, Martin Schapendonk <[EMAIL PROTECTED]> wrote: > I give up. 'values' doesn't work for me, 'options' does. > pr($audiences) shows me a nice key=>value array. > Hey, I'm not saying you're wrong. I'm just wondering why my method seems to work okay for me, and I'm using the latest bleedin

Re: $form->input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes <[EMAIL PROTECTED]>: > > Probably not, because I did also. > > > > Controller: $audiences = $this->Activity->Audience->generateList(); > > View: echo $form->input('ade_id', array('options'=>$audiences)); > > $values is the output of generateList() > > echo $form->input('fi

Re: $form->input() syntax for associations not following Cake conventions

2007-09-20 Thread Chris Hartjes
On 9/20/07, Martin Schapendonk <[EMAIL PROTECTED]> wrote: > > 2007/9/20, Chris Hartjes <[EMAIL PROTECTED]>: > > Well, the array I passed in was one I created using generateList() so > > it had key => value pairs. That might've made the difference. > > Probably not, because I did also. > > Control

Re: $form->input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes <[EMAIL PROTECTED]>: > Well, the array I passed in was one I created using generateList() so > it had key => value pairs. That might've made the difference. Probably not, because I did also. Controller: $audiences = $this->Activity->Audience->generateList(); View: echo

Re: $form->input() syntax for associations not following Cake conventions

2007-09-20 Thread Chris Hartjes
On 9/20/07, Martin Schapendonk <[EMAIL PROTECTED]> wrote: > > > Nope, doesn't work. Strange. When I look in > cake/libs/view/helpers/form.php, it mentions $options['options'] in > several places. I couldn't find any reference to $options['values']. Well, the array I passed in was one I created us

Re: $form->input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes <[EMAIL PROTECTED]>: > Really? I just did one with $form->input('fieldname', array('values' > => $array)) and it worked just fine. Interesting... Nope, doesn't work. Strange. When I look in cake/libs/view/helpers/form.php, it mentions $options['options'] in several plac

Re: $form->input() syntax for associations not following Cake conventions

2007-09-19 Thread Chris Hartjes
On 9/19/07, Martin Schapendonk <[EMAIL PROTECTED]> wrote: > > 2007/9/18, Chris Hartjes <[EMAIL PROTECTED]>: > > > How should I change the call to $form->input() to show a select-list? > > > The list with audiences is available to the view in variable > > > $audiences. > > > > Try this code using 1

Re: $form->input() syntax for associations not following Cake conventions

2007-09-19 Thread Martin Schapendonk
2007/9/18, Chris Hartjes <[EMAIL PROTECTED]>: > > How should I change the call to $form->input() to show a select-list? > > The list with audiences is available to the view in variable > > $audiences. > > Try this code using 1.2.x.x > > $form->input('ade_id', array('values' => $audiences)); Thank

Re: $form->input() syntax for associations not following Cake conventions

2007-09-18 Thread Chris Hartjes
On 9/18/07, Martin Schapendonk <[EMAIL PROTECTED]> wrote: > > How should I change the call to $form->input() to show a select-list? > The list with audiences is available to the view in variable > $audiences. Try this code using 1.2.x.x $form->input('ade_id', array('values' => $audiences)); Hop

$form->input() syntax for associations not following Cake conventions

2007-09-18 Thread Martin Schapendonk
Hi, Using latest cake alpha (r5427). I have an association between two models that doesn't follow Cake conventions ("Activity belongsTo Audience" and its counterpart "Audience hasMany Activity"). Cake's convention demands that the association is on Activity.audience_id. In my case, it isn't, it