Populate more dropdown field with the same data array

JoCo 17 Sep, 2019
Thanks to healyhatman i am now able to populate a dropdown field.
But in my form there are more dropdown fields.
What i am asking, is it possible to populate more then one dropdown field in my form with the same array data and how i must do that?
healyhatman 18 Sep, 2019
On your event settings (wher eyou say "on change, reload myFieldName") you can reload multiple fields by putting each field name on a new line, then having them all have their own reload events. Or you can put them all inside a container, and reload the container.
JoCo 19 Sep, 2019
Sorry healyhatman but the problems becoming bigger and bigger.
First I have 2 dropdown in a Multi field area. The content of those 2 dropdowns is exactly the same but they trigger both a different event to populate a dropdown.
The events are also exactly the same: a read data and a custom code element.
When i select a name in the first dropdown the event fills correctly the affected element, what is also a dropdown in a Multi field area.
When I select a name in the second dropdown in that Multy field area I see a strange reaction. It doesn't fills the dropdown with data but it displays the whole form in that dropdown field or a rectangle contains something like see below (option Debug is not active).
If i do then one or two page refreshings in the browser it yet fills the affected dropdown element.

Second problem, your answer above cannot work because the event contains a read date and a custom code element. In that custom code element i do a {view:field_select2}.
The custom code element doesn't work with 2 {view:field_name} codes. Also a second custom code element with one {view:...} code doesn't work.

I hope you can reproduce all these problems. When you want more info give me sign.
Array
(
    [option] => com_chronoforms6
    [cont] => manager
    [chronoform] => wvzuitslagen
    [event] => bezoekend
    [tvout] => view
    [datum] => 
    [weekdag] => zat
    [poule] => 1
    [klasse] => 1
    [hal] => sus
    [ontvteam] => 
    [bezteam] => 2
    [he1ontv] => 
    [he1bez] => 
    [select19] => y
    [select20] => y
    [text21] => 
    [text22] => 
    [he2ontv] => 
    [he2bez] => 
)
Array
(
    [submit_validate_fields] => Array
        (
            [log] => Automatic validation enabled.
            [var] => 1
        )

)
JoCo 19 Sep, 2019
healyhatman, you can skip the first problem with the 2 dropdowns. It's solved.
I found a setting called "Page type" with the wrong value: setting was "Auto-use page order" and must be "Standalone".
So the only problem is to fill more dropdowns with the same array data.
JoCo 23 Sep, 2019
To reload multiple fields by putting each field name on a new line, then having them all their own reload events works. But it is a laborious action for eight dropwdowns.
I thought perhaps there is an easier way to do so?
healyhatman 23 Sep, 2019
From my initial reply:

Or you can put them all inside a container, and reload the container.


Additionally you can give them all a class, and use .class-name (including the full-stop) as the target.
This topic is locked and no more replies can be posted.