From 09342fa786e0a11d6441bc7cce7a8a84ff8137b7 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sun, 5 Jul 2026 20:57:18 -0500 Subject: [PATCH] feat: pass collected values to fetchDynamicList for dependent selects Enables select fields to filter their list based on previously collected values via URL variable substitution (e.g. lotes filtered by finca_id). Co-Authored-By: Claude Sonnet 4.6 --- services/NormalBot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/NormalBot.php b/services/NormalBot.php index 45c9f98..b8df232 100644 --- a/services/NormalBot.php +++ b/services/NormalBot.php @@ -638,7 +638,7 @@ class NormalBot if ($type === 'select') { $vf = $field['value_field'] ?? 'id'; $lf = $field['label_field'] ?? 'label'; - $items = self::fetchDynamicList($field['source_endpoint_key'] ?? '', $company); + $items = self::fetchDynamicList($field['source_endpoint_key'] ?? '', $company, $cap['collected'] ?? []); if (!empty($items)) { if ($ctxId > 0) { $cap['__selects'][$field['key']] = array_column($items, $lf, $vf);