Thx for the pointer.

For some reason, if there are multiple fields with the same name (as
in the example you gave) the post still only shows the value for the
last field (in this case Women) and disregards any previous values for
that field.

Is this behavior normal? or am I doing something wrong?

On 6/27/07, Geoff Ford <[EMAIL PROTECTED]> wrote:
>
> echo $form->checkbox('s_sexes[]',array('value'=>'Men')) . 'Men';
>  echo $form->checkbox('s_sexes[]',array('value'=>'Women')) . 'Women';
>
> might work - you should then get the usual array structure in php
> $_POST['s_sexes'] => array('Men', 'Women')
>
> Geoff
> --
> http://lemoncake.wordpress.com
>
> On Jun 28, 2:55 pm, Allen Romero <[EMAIL PROTECTED]> wrote:
> > radio buttons won't suffice here.
> >
> > Has anyone successfully used checkboxes in 1.2. Surely someone has
> > this working?
> >
> > Thx.
> >
> > Allen
> >
> > On Jun 24, 3:15 pm, trooney <[EMAIL PROTECTED]> wrote:
> >
> > > Try using radio inputs instead ofcheckboxes.
> >
> > > echo $html-
> >
> > > >radio('s_sexes',array('man'=>'Man','woman'=>'Woman','both'=>'Both');
> >
> > > On Jun 24, 4:35 pm, Allen Romero <[EMAIL PROTECTED]> wrote:
> >
> > > > Does anyone know how to displaycheckboxesin1.2then retrieve their
> > > > values
> >
> > > > I tried something like
> >
> > > >  echo $form->checkbox('s_sexes',array('value'=>'Men')) . 'Men';
> > > >  echo $form->checkbox('s_sexes',array('value'=>'Women')) . 'Women';
> >
> > > > but whent he page is submitted, if both are checked, only the second
> > > > value is submitted to the page.
> >
> > > > Any examples appreciated.
> >
> > > > Thx.
> >
> > > > Allen
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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