The only thing I found is this 'key' => $field['test'], should be 'key' => $field['name'],
In my application I use the same filter for multiple fields and since ACF passes the field array to the filter you can get the field name from there rather than building a specific filter for each field. If you want the filer to only work on this field then the code should be 'key' => 'test',
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Clients need flexibility. Developers need a repeatable workflow that doesn’t have a steep learning curve. See how digital marketing agency Noiza found both with Advanced Custom Fields in our latest case study.https://t.co/BxQAy6COJt