I've got content-type includes 'field1' and 'field2'. These fields are integer value. Thanks to Views module I created page 'Page1' with contents. In main menu I've got search whit some filters. After filling filters and entering, we can see appropriate contents in 'Page1'. I'd like to create filters or fields in search to allow user to fill in 'min' and 'max' values. After it I want to choose a content only if 'field1' and 'field2' of that content is beetwen 'min' and 'max'. How can I do it?

1 Answer 1


Make use of the contextual range filter module to create a filter range on your field 1 and field 2 and expose the filter

is a simple plugin for Views that adds the option to contextually filter, not just by a single value, but also by range.

Numeric, alphabetical (string) and list ranges are all supported. Node ids, user ids and even taxonomy term ids are all special cases of numbers so will work also. Range-filtering on the "created" (posted) and "updated" (last modified) node properties is also supported, provided you use the correct format as dictated by Views. So, YYYYMMDD for full dates or one of the shorter year+month, year-only, month-only, week-only and day-only formats.


Once you have installed the modules. Go to the views display you are working on, and under the filter category, select add. enter image description here

Choose the field1 you created with an integer field and click add to display

enter image description here

Check the box expose filter to visitors. In the operator drop down, select is between and two text box should appear(min and max). Click on apply and you should see the form on top of your display. Do the same for field 2

  • Thanks for your answer. I've installed that module and I tried to found out how to use it, but I've had difficulty in using it. Could you give me some directions?
    – user19455
    Jul 31, 2013 at 11:02
  • I have updated the answer.
    – 4life
    Jul 31, 2013 at 11:15
  • That's extremely helpful. Thank you so much! I've had one trouble yet. I did what you had written. In my search appears two additional inputs and text "and" between them. I'd like to inform users that these inputs should be filled in min and max values. I want to place text above them or place placeholder - it doesn't matter. How can I do it?
    – user19455
    Jul 31, 2013 at 11:49
  • On the first image in the answer under the header category, select the Global:Text area and put your text in there
    – 4life
    Jul 31, 2013 at 11:57
  • Ok, I try do that. I've noticed I need slightly different solution. I'd like to have two input in search (min and max as I have) and I want to display content whose field1 or field2 is between min and max. Could you tell me what can I do?
    – user19455
    Jul 31, 2013 at 12:09

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.