Problem/Motivation

Hello,

While retrieving the contents from a JSON, some of these contens can be tags or other categorization type fields.
However all the filters are a textfield input and we may want to use a simple select to filter the view.

Proposed resolution

Created a patch with an exposed form style that changes the type of the exposed field to a select with the available field options.

Comments

tmiguelv created an issue. See original summary.

tmiguelv’s picture

Status: Active » Needs review
StatusFileSize
new5.62 KB

Please review

tmiguelv’s picture

StatusFileSize
new10.35 KB

I've added and option to select the type of widget it will use (checkbox, radios or select), a collapsible details element and multiple values support

lunazoid’s picture

Thank you! I am implementing a view where filtering with select options would be necessary, and this does work very well! One thing I had to change however was in your switch condition for the filter, there is no default for the "select" option when it is neither collapsible nor multiple. It seems like we can get rid of the "elseif" and make that a default, and it will work well.

anblee’s picture

Hi, thanks for this patch, however I cannot apply the patch. Maybe I'm doing something wrong? This is referencing the 3345790-3.patch

UPDATE : I was able to add the patch.

thony1199’s picture

Version: 8.x-1.4 » 2.0.2
StatusFileSize
new15.85 KB

They recently updated to version 2.0.2 and the patch stopped working, so I adjusted it a bit, to have it for that version of the module