You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+82Lines changed: 82 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,6 +241,88 @@ $builder
241
241
]);
242
242
```
243
243
244
+
### Including other field values in request
245
+
246
+
If you need to include other field values because the selection depends on it you can add the `req_params` option.
247
+
The key is the name of the parameter in the query string, the value is the path in the FormView (if you don't know the path you can do something like `{{ dump(form) }}` in your template.)
248
+
249
+
The `property` option refers to your entity field which is used for the label as well as for the search term.
250
+
251
+
In the callback you get the QueryBuilder to modify the result query and the data object as parameter (data can be a simple Request object or a plain array. See AutocompleteService.php for more details).
Because the handling of requests is usually very similar you can use a service which helps you with your results. To use it just add a route in one of your controllers:
0 commit comments