1

I'm creating a real estate search, and I'm wondering how I might be able to use the Views module to find properties based on their rent per month using a "Min" and "Max" drop downs as opposed to just using text fields.

Essentially, I would like a filter to appear as "Min" drop down box with arbitrary numbers ($100, $200, $300......$10000) and a "Max" drop down with the same values.

Is this possible with any current modules? If not, is it possible through hook_form_alter()? If so, can someone point me in the direction of how to get acquainted with working with forms in greater detail?

1
  • This fiddle should be of help, it's for selects, but it's easily adaptable to drive a textfield instead: jsfiddle.net/aLyM8/17
    – Jedihe
    Commented Jan 31, 2012 at 20:44

2 Answers 2

1

Sure. You can do it with form alter hooks. Here is an example. The form id will be:

views_exposed_form_<view_name>_<view_type>
0

Check the Better Exposed Filters module. It has exactly what you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.