-- Andrew Yager <[EMAIL PROTECTED]> wrote
(on Thursday, 11 September 2008, 12:40 AM +1000):
> I have an interesting problem with the checkbox widgit.
>
> I have a number of checkboxes in a form with checked and unchecked
> values set.
>
> The form displays properly, but the submitted values don't come through
> correctly. This is a dump of $_POST after submission.
>
> array(9) {
> ["CBAudio"]=> string(1) "0"
> ["CBS208"]=> string(1) "0"
> ["CES208"]=> string(1) "0"
> ["CEAudio"]=> string(1) "0"
> ["NTAudio"]=> string(9) "notenroll"
> ["NTS208"]=> string(6) "enroll"
> ["OTAudio"]=> string(1) "0"
> ["OTS208"]=> string(6) "enroll"
> }
>
> The value default checked values have correctly returned the value of
> 'enroll'. The additional checked value has returned 'notenroll' rather
> than 'enroll'. The values not checked have returned '0'.
Can you check this against current trunk? I corrected an issue with
dojo checkboxes late last week that may have affected this behavior (for
the better).
> We could manually process this to make it understand, but I imagine the
> default behaviour should return the correct values.
>
> The form elements are created by looping the values from this snippet,
> and is part of a subform.
>
> $form->addElement(
> 'CheckBox',
> $id,
> array(
> 'label' => $row['fullname'],
> 'checkedValue' => 'enroll',
> 'uncheckedValue' => 'notenroll',
> )
> );
>
> Visually it looks correct and appears to work.
>
> Any suggestions?
>
> Thanks,
> Andrew
>
> --
> Andrew Yager, Managing Director (MACS BCompSc MCP)
> Real World Technology Solutions Pty Ltd
> ph: 1300 798 718 or (02) 9037 0500
> fax: (02) 9037 0591 mob: 0405 152 568
> http://www.rwts.com.au/ or http://www.stonebridgecomputing.com.au/
>
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend Framework | http://framework.zend.com/