contributte / forms-multiplier

:repeat: Form multiplier & replicator for Nette Framework

Home Page:https://contributte.org/packages/contributte/forms-multiplier.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set defaultValues for two nested multipliers? Possible bug

BigOHenry opened this issue · comments

Hello, i have problem with setting default values into two multipliers (second multiplier is inside first one).

i have this kind of array with default values:

$defaultValues = array(
                    0 => array(
                        'input1' => 'val1',
                        'input2' => 'val2',
                        'multiplier_child' => array(
                            0 => array(
                                'input3' => 'val3'
                            ),
                            1 => array(
                                'input3' => 'val4'
                            )
                        )
                    ),
                    1 => array(
                        'input1' => 'val5',
                        'input2' => 'val6',
                        'multiplier_child' => array(
                            0 => array(
                                'input3' => 'val7'
                            )
                        )
                    )
                );

Default values are set into input1 and input2 correctly, but input3 is empty at both containers.

Do i have right array for default values?

Wow, thank you for light speed fix :-) Its working now