• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Warning: Invalid argument supplied for foreach()

Warning: Invalid argument supplied for foreach() 12 years 5 months ago #15478

  • reicegar
  • reicegar's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi,
first my english is very bad so I will try explain

I have problem with rsform pro when I try put this code in tab script form display:

$database =& JFactory::getDBO();
$database->setQuery("SELECT cod_familia, nombre FROM #__rsform_familia");
$data = $database->loadObjectList();

foreach($fields as $i=>$field){
if($fields->name=='cbFamilia'){
echo "Que coño pasa";
$string = array();
if(!empty($data)){
foreach($data as $data_row){
$string[] = $data_row->cod_familia.'|'.$data_row->nombre;
}
}
$string = implode(',',$string);
$fields[$i]->default_value = $string;
}
}

ok, the next error is this

Warning: Invalid argument supplied for foreach() in /home/hierrosm/public_html/administrator/components/com_rsform/helpers/rsform.php(1354) : eval()'d code on line 5

I saw so much pages but I don't found a solution this problem
please I need help fast
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!