From a16f3bdf31409da9f00a9ad4b68531221ff57476 Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Tue, 4 Nov 2025 13:06:58 +0100 Subject: [PATCH] FIX 16.0: extrafield of type link to category causes SQL error in selectForFormsList() (#36074) * FIX 16.0 (up to 19.0): extrafield of type link to category causes SQL error in selectForFormsList * Apply suggestion from @atm-florianm --- htdocs/core/class/html.form.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 59ad9db8377..beb884f39bc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7821,6 +7821,8 @@ class Form if ($tmpfieldstoshow) { $fieldstoshow = $tmpfieldstoshow; } + } else if ($objecttmp->element === 'category') { + $fieldstoshow = 't.label'; } else { // For backward compatibility $objecttmp->fields['ref'] = array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1);