1
votes

I'm using Profile to add a "Department" field to user profiles. I'm using Views to create a view of users, with "Department" being an Exposed Filter. The Exposed Filter is a textfield. I'd like for it to be a select dropdown that is populated with all possible values.

Is anyone aware of a module that will alter Views filters, changing fields from textfields to select dropdowns?

Drupal 6. Views 2. The profile field is a single-line textfield (with autocomplete).

3

3 Answers

1
votes

i had the same issue in a project fields that are textboxes show be select box. as attachment image shows in 'FILTER CRITERIA' choose your field in 'Filter type to expose' part choose 'Grouped filters' a table will be shown that you manually can add your data as options

this solution is good when you know your options

this is my RTL settings for expose a textbox filter this is my RTL settings for expose a textbox filter

this is my RTL settings for expose a textbox options this is my RTL settings for expose a textbox options

and in UI - client side this field will be shown like this and in UI - client side this field will be shown like this

0
votes

What kind of profile field is "Department"? I'm assuming it's one of single-line textfield, multi-line textfield, checkbox or list selection. I only tested it with a list selection, but if you check "Force single" then the exposed filter will be a select dropdown.

Assuming you mean Drupal 6. The above is true with Views 2.x and 3.x on D6.

0
votes

If you want to modify an existing filter, follow the accepted solution provided here.

If altering an existing filter does not satisfy your requirements, then this step-by-step tutorial will help you creating your own custom Views filter.