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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
2bdbde50f5
commit
09342fa786
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user