Hello to everyone,
I would like to ask you for a help.
I have a CCv5 table and I am using filtering dropdowns filled by this code:
I try this code with similar modifications, but it doesnt work:
thank you
I would like to ask you for a help.
I have a CCv5 table and I am using filtering dropdowns filled by this code:
\GCore\Libs\GModel::generateModel("Drop4", array('tablename' => "employers",));but this dropdown hasnt an empty option for filtering all data.
$class4 = '\GCore\Models\Drop4';
$data4 = $class4::getInstance()->find('list', array('fields' => array('position', 'position'), "order" => array("position")));
$options4 = $data4;
I try this code with similar modifications, but it doesnt work:
array_unshift($data4, '');When I use this code I can choose empty option and it filter all dat, but this code shows options in dropdown depending on pagination (data in other page arent allow in dropdown)
$keys = \GCore\Libs\Arr::getVal(\GCore\Libs\Arr::getVal($rows, explode(".", "[n].pk")), explode(".", "[n].position"));could you give me an advise how resolve it?
$values = \GCore\Libs\Arr::getVal(\GCore\Libs\Arr::getVal($rows, explode(".", "[n].pk")), explode(".", "[n].position"));
array_unshift($keys, '');
array_unshift($values, 'all data');
$options = array_combine($keys, $values);
thank you
I figure out and it works
$data_keys = array_keys($data);
$data_values = array_values($data);
array_unshift($data_keys, '');
array_unshift($data_values, 'all data');
$options = array_combine($data_keys, $data_values);
This topic is locked and no more replies can be posted.