This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Troiscent
Troiscent

Hello,

I'm creating a plugin with some custom model, lists etc....

Everything works well except list filters, I would like to be able to filter the backend list depending on the content title.

By reading the documentation, it seems there are no textfield type for filters (strange to see complex daterange widget and no simple textfield). How can I add a textfield filter to be able for example, to filter my content depending on the title (%like% comparaison).

Thanks

Alex

Tschallacka
Tschallacka

Basically what you describe is the search field.

Just set all columns to searchable: false and the columsn you wish to search through to searchable: true in columns.yaml

columns:
    name:
        label: name
        searchable: true
    sort_order:
        label: sorting

and make sure you have this in your config_list.yaml

# Toolbar widget configuration
toolbar:
    # Partial for toolbar buttons
    buttons: list_toolbar

    # Search widget configuration
    search:
        prompt: backend::lang.list.search_prompt
Troiscent
Troiscent

Ah ok, thank you for the answer, it works.

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.