Closed (fixed)
Project:
Views Contextual Range Filter
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Feb 2013 at 19:26 UTC
Updated:
26 Feb 2013 at 11:35 UTC
I cant make this work as exposed filter so here is what i tried:
Node has price field. Field is integer with slider as widget and it works fine on edit form.
I created contextual filter with the field price. Saved without changing anything in options (this is where i proly missed something important..) On module settings enabled this contextual as number range.
Comments
Comment #1
rdeboerHi BigBrother,
I think what you missed is installing the the Views Global Filter module. With that enabled. Then go back first to your Views contextual filter and press the "Provide default value" followed by selecting "Global filter (Field)".
Save. You'll get a yellow warning saying you haven't defined a Global Filter yet with a link to the block configuration page. In the "disabled" section find "Global Filter 1" and configure it, following the prompts.
For the widget select "inherit" and below those radio-buttons tick the "Convert to range" checkbox.
See the screenshots in this issue: #1903180: Cannot convert Slide with Style slider to range for use with Views Global Filter ? (that issues says you need to install the dev version of Global Filter but you don't have to anymore as the new release is out now).
That should do it.
Let us know how you went.
Good luck!
Rik
Comment #2
BigBrother2010 commentedHi RdeBoer,
Thanks for the answer!
In meantime i did what you said and got global filter with range slider to work nicely.
One problem (not sure if its because of this module) is:
Price range is from 1 to 10000000.
When i pick a number from for example 2000000 to 10000000 i get this error:
"Price cannot be longer than 12 characters but is currently 16 characters long."
If its less then 12chars works ok.
Comment #3
rdeboerWhat are you selling that costs 10,000,000 (GBP, Euro, dollar?) .... real estate, cocaine ?
This module cannot do much about this, as it does not provide or alter the widget... But the Views Global Filter module could. Let me investigate.
In the mean time would it not make sense to deal in terms of thousands rather than units? So your range would be 2,000 k to 10,000 k ? Or even 2.00 M to 10.00 M (with increments of say 0.05 or 0.10) ?
Also, if you suppress the "synchronised textfield" on the widget (on the Manage Fields --> edit tab), does the error still occur?
Comment #4
rdeboerFix committed to Views Global Filter module.
Available in the latest snapshot 7.x-1.x-dev (12 Feb or later).
Rik
Comment #6
rdeboer