$value) {$tmp[$key]=array('modelName'=>$value);}return $tmp;[/em][br][br]Is it possible to add an option in SQLElement to add a model name?​Thanks"> SQL Element: usse results in Table List - Forums

Forums

SQL Element: usse results in Table List

Colnem 25 Jan, 2022
Hi guys

Unless I'm mistaken, CF7 Read Data Element return all fields from a Database Table.
So, sometimes, I use SQL Element to return few fields.

But I can't use the results directly in Elements like Tablelist or Dropdown, because SQL Element has no Model Name.
I have to use a PHP code like this:
[em]$tmp=$this->get("sql_data_6", "");
foreach ($tmp as $key => $value) {$tmp[$key]=array('modelName'=>$value);}
return $tmp;[/em][br][br]Is it possible to add an option in SQLElement to add a model name?

Thanks
michellejohnson 04 Jul, 2022
I'm working on a solution to that error as I have the same problem. Stay connected with us.
You need to login to be able to post a reply.