Issues

ZF-2828: MultiCheckboxes repopulating with post data

Description

I'm just going to post a print_r of my two arrays. First is the one used to build a simple form:


Array
(
    [method] => post
    [elements] => Array
        (
            [100_1] => Array
                (
                    [0] => multicheckbox
                    [1] => Array
                        (
                            [multioptions] => Array
                                (
                                    [100_1_1] => Agriculture
                                    [100_1_2] => Automotive
                                    [100_1_12] => Chemical
                                    [100_1_13] => Communications
                                )

                            [required] => 1
                            [label] => Select the industry or industries that you work in
                        )

                )
            [Submit] => submit
        )

)

The second is the post data with all 4 fields checked:


Array
(
    [100_1] => Array
        (
            [0] => Array
                (
                    [0] => 100_1_1
                )

            [1] => Array
                (
                    [0] => 100_1_2
                )

            [2] => Array
                (
                    [0] => 100_1_12
                )

            [3] => Array
                (
                    [0] => 100_1_13
                )

        )
    [Submit] => Submit
)

Populating the form with the post data will not refill the check boxes.

This is for the latest HEAD: 8634

Comments

I need: * Minimum code needed to reproduce (use an array from a form submission, if need be) * Expected outcome * Actual outcome

The description you gave does not give me nearly enough to go on.

Additionally, please advise as to what version of ZF you are using * Preview Release * RC1 * Current trunk (and whether you had updated just prior to submitting the report)

Downgrading issue and removing priority until submission can be clarified.

I'm just going to post a print_r of my two arrays. First is the one used to build a simple form:


Array
(
    [method] => post
    [elements] => Array
        (
            [100_1] => Array
                (
                    [0] => multicheckbox
                    [1] => Array
                        (
                            [multioptions] => Array
                                (
                                    [100_1_1] => Agriculture
                                    [100_1_2] => Automotive
                                    [100_1_12] => Chemical
                                    [100_1_13] => Communications
                                )

                            [required] => 1
                            [label] => Select the industry or industries that you work in
                        )

                )
            [Submit] => submit
        )

)

The second is the post data with all 4 fields checked:


Array
(
    [100_1] => Array
        (
            [0] => Array
                (
                    [0] => 100_1_1
                )

            [1] => Array
                (
                    [0] => 100_1_2
                )

            [2] => Array
                (
                    [0] => 100_1_12
                )

            [3] => Array
                (
                    [0] => 100_1_13
                )

        )

    [100_2] => 
    [100_3] => 
    [100_5] => 
    [Submit] => Submit
)

Populating the form with the post data will not refill the check boxes.

This is for the latest HEAD: 8634

I've added a test for this in trunk and the 1.5 release branch, but this was resolved previously with fixes for ZF-2830.

Please evaluate and categorize as necessary.