Forums

Dynamic Dropdown in Multiplier

LukyP 11 Jan, 2016
Hello,

i have a Problem with the dynamic Dropdowns in a Multiplier.
The Name od the first Dropdown ist "text[__N__][field1]" (__N__ is the Replacer)
The Name of the second Dropdown is "text[__N__][field1]". Under "Events" in the first dropdown is Action: "Set Dynamics Options" and a Function "Load_daten"

this is the Function (in Setup-Section):

<?php
$clubs = array(
	"ENG" => array("Arsenal" => "Arsenal", "Chelsea" => "Chelsea", "Liverpool" => "Liverpool", "Manchester" => "Manchester"),
	"GER" => array("Bayern Munchen" => "Bayern Munchen", "Dortumund" => "Dortumund", "Shalcke" => "Shalcke"),
);


echo json_encode($clubs[$form->data["text"]["field1"]]);


But it does not work, the second drop is not loaded with data

Here is the array, which is displayed in the debugger

Array
(
    [option] => com_chronoforms5
    [chronoform] => demo-dynamic-dropdown2
    [event] => submit
    [text] => Array
        (
            [0] => Array (= Replacer "__N__")
                (
                    [field1] => ENG
                )

        )

    [button3] => Submit
)


Sorry for my bad english, I have never learned the language!

Please help

Luky
GreyHead 12 Jan, 2016
Hi Luky,

I'd have to build a form to test this - but why do you need to use Dynamic Drop-Downs if you already know the list of options/teams?

Bob
LukyP 12 Jan, 2016
And how I do it, that in the second drop only going to choose what fits to choose from the first drop-downs?

Luky
LukyP 12 Jan, 2016
It is later a configurator for the window:
One chooses a window (1 wing, 2 wings, fixed glazing etc.) and in the second drop come right opening types
GreyHead 12 Jan, 2016
Hi Luky,

OK - we call that a 'double' drop-down where the options in the second one depends on the selection in the first one.

I'm not sure how to do that in a multiplier :-( When I have some time I'll see if I can work it out.

Bob
LukyP 12 Jan, 2016
Thank you very much! Would be really great if you would find a solution there.
LukyP 16 Jan, 2016
I wanted to ask if you have already found a solution for the "double drop down" in the multiplier - several coffees for you are guaranteed :-)
LukyP 28 Jan, 2016
I wanted to ask if you have already found a solution for the "double drop down" in the multiplier - several coffees for you are guaranteed :-)
This topic is locked and no more replies can be posted.