Hi, with the help of your wonderful application Chronoforms v6 I have created a form that allows me to extract data from a database, specifically Bible verses starting from book and chapter. The output variable is obviously an array of data and I need to show only the field of my interest called "TestoLuzzi" on the screen. I tried using the "Loop" function by setting the Data Provider, as you suggested on page 28 of your Manual, with {data: dataluzzi} where dataluzzi is the name of the array containing the data and "Loop body" with {var : loop104} where loop104 is the name of the loop. This way I don't have any output data. Then I tried to set the Data Provider {var: dataluzzi} keeping "Loop body" {var: loop104} and in this case returned the output the string {"row":{"dataluzzi":{"TestoLuzzi":"[x] yyyy "}},"key":z}. I tried with {var: loop104.row.TestoLuzzi} in the "Loop body" but I have no results in the output. The question is: how can I go about having only the data of the field of my interest output (TestoLuzzi)? Thanks for your interest and valuable advice.
Sorry, have I been offensive to anyone being ignored? Thanks
it depends on the structure of your array, the syntax is:
{var:loop_name.row.sub_element}
Where "loop_name" is the name of the Loop action and "sub_element" is the name of a sub element key
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi,
could I get some help? If I haven't explained the problem enough, I can try again. Thanks
In the loop, you want {var:name_of_the_loop_function.row.name_of_the_data_model.name_of_the_field}
The data source for the loop should be {var:name_of_read_data_function}
healyhatman Thank you for your suggestion. Unfortunately as you can see from the pictures it doesn't work. How to find the solution? Can it depend on the version of PHP? My version of PHP is 7.3.8.
Thanks in advance for further suggestions.
Why are you retrieving array of key value pairs?
Just put {var:loopnamehere.row} to see the data available each loop
Hi healyhatman,
I can't get out of it! I selected the type "Index the results list by one or more fields values." But nothing has changed. I am available to give administrator access to understand what is wrong: Thanks for your help
Just select the data normally
WOW ... wonderful !!!
Many Thanks healyhatman!
As you said it was enough to set Select type in "All matching records" to get the desired data on the output!
Thanks for your availability and your kindness. See you soon.