Hi Bob,
I have no more quote(), but ....
I can't view the database in a table in front end.
In DB Read:
Action label: lecture
enable: yes
my table name
multi read: yes (i have test no)
enable model id: yes
model id: liste
fields: titre,Image,description
conditions :
and... Invalid argument supplied for foreach()
Where is my error?
I have no more quote(), but ....
I can't view the database in a table in front end.
In DB Read:
Action label: lecture
enable: yes
my table name
multi read: yes (i have test no)
enable model id: yes
model id: liste
fields: titre,Image,description
conditions :
<table>
<?php
foreach ($form->data['liste'] as $liste):
?>
<tr><td>Titre: <?php echo $liste['titre'];?></td><td>Titre: <?php echo $liste['Image'];?></td><td>Titre: <?php echo $liste['description'];?></td>
</tr>
<?php
endforeach;
?>
</table>
and... Invalid argument supplied for foreach()
Where is my error?
Hi Irate,
I guess that at the time this code is running $form->data['liste'] is either empty or doesn't exist. Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Note: if you are using the Easy Wizard you can turn on Debug on the Others tab in CFv4 or the Setup tab in CFv5.
Bob
I guess that at the time this code is running $form->data['liste'] is either empty or doesn't exist. Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Note: if you are using the Easy Wizard you can turn on Debug on the Others tab in CFv4 or the Setup tab in CFv5.
Bob
Hi Bob,
in french, je suis une buse 😀
Error message in frontend :
Warning: Invalid argument supplied for foreach() in /var/www/hebergement/lamap44/home/sites/administrator/components/com_chronoforms5/chronoforms/actions/db_read/db_read.php(82) : eval()'d code on line 3
Data Array:
errors:
Debug Info:
In DB Read:
Action label: lecture
enable: yes
my table name: chron.... datatable_newmateriel
multi read: yes
enable model id: yes
model id: data
fields: id,titre,Image,description
conditions :
I'm going round and round in circles
Bruno
in french, je suis une buse 😀
Error message in frontend :
Warning: Invalid argument supplied for foreach() in /var/www/hebergement/lamap44/home/sites/administrator/components/com_chronoforms5/chronoforms/actions/db_read/db_read.php(82) : eval()'d code on line 3
Data Array:
Array
(
[option] => com_chronoforms5
[chronoform] => affichemateriel
[Itemid] =>
[data] => Array
(
[0] => Array
(
[id] => 1
[titre] => portrait
[Image] => 20151213141604_portrait3.jpg
[description] => portrait3
)
[1] => Array
(
[id] => 2
[titre] => corps humain
[Image] => 20151218143405_corps_humain_01.jpg
[description] => squelette,...
)
)
)
Array
(
)
errors:
Array
(
)
Debug Info:
Array
(
[2] => Array
(
[DB Read] => Array
(
[Queries] => Array
(
[0] => SELECT `data`.`id` AS `data.id`, `data`.`titre` AS `data.titre`, `data`.`Image` AS `data.Image`, `data`.`description` AS `data.description` FROM `ijklr_chronoengine_chronoforms_datatable_newmateriel` AS `data`
)
)
)
)
In DB Read:
Action label: lecture
enable: yes
my table name: chron.... datatable_newmateriel
multi read: yes
enable model id: yes
model id: data
fields: id,titre,Image,description
conditions :
<table>
<?php
foreach ($form->data['newmateriel'] as $materiel):
?>
<tr><td>Titre: <?php echo $materiel['titre'];?></td><td>Image: <?php echo $materiel['Image'];?></td><td>Description: <?php echo $materiel['description'];?></td>
</tr>
<?php
endforeach;
?>
</table>
I'm going round and round in circles
Bruno
Hi Bruno,
I can't match the error message you are seeing with the code in the latest version of ChronoForms for Joomla! 2.5. Please will you check which version you have and upgrade if necessary. That may not fix the problem but should help find out what is happening.
Bob
I can't match the error message you are seeing with the code in the latest version of ChronoForms for Joomla! 2.5. Please will you check which version you have and upgrade if necessary. That may not fix the problem but should help find out what is happening.
Bob
Hi Bob,
Warning: Invalid argument supplied for foreach() in /var/www/hebergement/lamap44/home/sites/administrator/components/com_chronoforms5/chronoforms/actions/db_read/db_read.php(85) : eval()'d code on line 3
Bruno
Warning: Invalid argument supplied for foreach() in /var/www/hebergement/lamap44/home/sites/administrator/components/com_chronoforms5/chronoforms/actions/db_read/db_read.php(85) : eval()'d code on line 3
Bruno
it should be
Regards,
Max
$form->data['data']
and that code should be inside a "custom code" action, not in the "conditions" box.
Regards,
Max
This topic is locked and no more replies can be posted.