Advanced filter form fields in Flop Phoenix

Hi all,

I am evaluating to start using Flop Phoenix to do sorting, filtering and pagination.
I was able to make a simple filter form with compund and join fields.
That is impressive work, kudos to the contributors!

My question is about the filter form:
I have a join field which refers to strings (think about a user that has many roles).

My goal would be to have a form with roles names as checkboxes, and run the filter using that.

Is that doable with Phoenix Flop?

Cheers!

Yes, definitely. If you use an input component as generated by Phoenix 1.7, you can add a new type checkbox-group that takes an options attribute the same way the select type does. I actually like to add both checkbox-group and radio-group that way, so that I can switch between a select, check boxes, and radio buttons just by changing the type attribute. The op of the filter needs to be set to in.

2 Likes

OMG this library is fantastic!!! :heart_eyes:

1 Like