Autocomplete search inside a dropdown

Hello everyone,

I’m trying to display a search inside a backend relation widget. Exactly like the one available for dropdown form field types.

Is there a way to do this with the default widget or I need to create a custom one?

This is possible by building a custom form widget and using this markup to render the select:

    class="form-control custom-select"
    style="width: 200px"
    data-request-data="foo: 'bar'">

Then this is an example AJAX handler for the results:

public function onGetSelectOptions()
    return [
        'results' => [
            'w25' => 'Width 25',
            'h40' => 'Height 40',
            'p90' => 'Padding 40',
1 Like