By the way, I'm using ZF version 1.8.3


Anders Gunnarsson skrev:
Unfortunately that didn't help.

The $_POST gives me
['groups'] => Array ( [0] => 2 [1] => 3 [2] => 4 )

But $form->getValues() still gives me
['groups'] =>




Sergio Rinaudo skrev:

Hi,
I am not sure if this is your solution, but after you instanciate the form, try to set RegisterInArrayValidator to false


$form = new Your_Form(); // just an example
$form->groups->setRegisterInArrayValidator(false);

Give it a try.
Bye




> Date: Mon, 21 Sep 2009 16:58:15 +0200
> From: and...@metropolis.se
> To: fw-general@lists.zend.com
> Subject: [fw-general] Zend_Form_Element_MultiCheckbox values
>
> Hi
>
> My checked checkboxes are missing in the Post.
>
> I'm making checkboxes like this:
>
> $group = new Zend_Form_Element_MultiCheckbox('groups');
> $group->addMultiOption(1,'A');
> $group->addMultiOption(2,'B');
> $group->addMultiOption(3,'C');
> $form->addElement($group);
>
> They look good in the html, and when posted I can see "groups" as an
> array in $_POST,
> but just an empty string when looking in the
> $form->getValues()
>
> What do I need to do to make the checkboxes appere in $form->getValues() ?
>
> regards
> Anders

------------------------------------------------------------------------
Preparati alla sfida all'ultima combinazione, gioca con Crosswire! <http://livesearch.games.msn.com/crosswire/default_it/>
------------------------------------------------------------------------
Scarica Messenger gratis: comunica, divertiti e condividi rapidamente! <http://messenger.it/home_comunica.aspx>

Reply via email to