You are not logged in.
Pages: 1
We are using a matrix field type in a module. When add/edit the field, it shows the ID instead of the title. We have the checkbox as "Use as title" for the column we want. We upgraded to bigtree 4.5.1 and not sure if this is a bug or something we need to do differently?
URL is picture of matrix from developer>module and module, it should say Board Certification instead of 5
https://ibb.co/mTLhkwS
Offline
It should be showing description instead of value.
Offline
I'll try to take a look into this issue this weekend!
Offline
Tim,
Were you able to look into this issue?
Thanks
Offline
Hi Doon! Sorry for the late reply, I believe this is fixed in 4.5-devel (you'll have to re-save a page with corrupt title data) — there's quite a lot waiting in there for a 4.5.2 release, I should kick that out soon (maybe this weekend).
Offline
Thanks for the reply!
Offline
Hey Tim,
Just updated to bigtree 4.5.2 and it kind of fixed the issue. Fixed for list field but I also have a custom list field. The custom list field still shows the value instead of description.
Code below for my custom list field.
Draw
$services_module = new services;
$services = $services_module->getAll("title ASC");
$list = array();
foreach($services as $item){
$list[] = array("value" => $item["id"],"description" => $item["title"]);
}
$field["options"]["list_type"] = '';
$field["options"]["allow-empty"] = "Yes";
$field["options"]["list"] = $list;
include BigTree::path("admin/field-types/list/draw.php");
Process
$field["output"] = htmlspecialchars($field["input"]);
Do you see anything that I could be doing wrong?
Thanks
Offline
Tim,
I found another issue with the matrix field and list field not showing the selected item. The function processFieldDescription(core/inc/bigtree/admin.php) should have an else statement if list_type is not a "db". That means it is a static list and will still need to get the description.
Something like below added on line 7739
//Get static list description
else {
foreach ($field["settings"]["list"] as $list) {
if($list["value"] == $output) {
return $list["description"];
break;
}
}
}
//Get static list description - end
Offline
Pages: 1