Array inside Events not work

Use an array from a database query in ChronoForms events.

Overview

The issue occurs when trying to directly reference an array variable from a database read action within a CF event.
Instead of referencing the array directly, use a custom PHP code event to retrieve the array values, join them into a string, and then return that string as a new variable for use in the form.

Answered
ChronoForms v7
ie ieraora 11 Jul, 2021
Hi, I can try to add an array inside an events, without success.
The array that I can try was {var.join[,]:read_gallerie.Galleria.id_galleria},

If i try {var:read_gallerie.1.Galleria.id_galleria}, it work correctly.

How can I do?

Thanks for replay

Link to emage: https://ibb.co/fxvct2z
ie ieraora 26 Jul, 2021
Answer
Found Solution:

$id_gall_j = $this->get("read_gallerie.[n].Galleria.id_galleria");
$id_gall_j = join('","', $id_gall_j);
return array( "id_gall_j"=> $id_gall_j );
This topic is locked and no more replies can be posted.