Hello,

A little background:

I have a 'Height' field (integer list). Keys are measurements in inches, labels are corresponding height in a 'xft yin' format. I am using the Slide with Style module to allow the end user to input their height via a slider. I am also using the Views Contextual Range Filter and this module so I can display an exposed filter block on the same page as my view that will allow filtering by a height range (also using the slider widget).

All is well until I setup the Global filter block. It looks like this:

Filter Driver: field (my height field)
Widget to render the Global Filter: Inherit slide_with_style_slider from field Height
I have checked the 'Convert slider to range slider' checkbox

Before setting up the Global Filter block, the field on my node creation screen is a slider, as it should be. After setting up the Global Filter block as specified above, the field on my node creation form reverts to a txt field even though the widget is still specified as a slider. The exposed filter, however, works just as expected. The widget on the exposed filter is correct (slider with 2 sliders. Just the widget on the node form is effected.

When I look at the HTML output on my node creation form, I see the following

<div id="edit-field-athlete-height-select--2" class="field-type-list-integer field-name-field-athlete-height-select field-widget-slide-with-style-slider form-wrapper">
<div id="field-athlete-height-select-add-more-wrapper">
<div class="form-item form-type-textfield form-item-field-athlete-height-select-und-0-value">
<label for="edit-field-athlete-height-select-und-0-value--2">Height </label>
<input id="edit-field-athlete-height-select-und-0-value--2" class="edit-slide-with-style-slider form-text" type="text" maxlength="128" size="5" value="" name="field_athlete_height_select[und][0][value]">
</div>
<div class="slide-with-style-slider"></div>
</div>
</div>

The div with the 'slide-with-style-slider' class is empty.

It should look like this (I removed the Global Filter block settings related to this field)

<div id="edit-field-athlete-height-select" class="field-type-list-integer field-name-field-athlete-height-select field-widget-slide-with-style-slider form-wrapper">
<div id="field-athlete-height-select-add-more-wrapper">
<div class="form-item form-type-textfield form-item-field-athlete-height-select-und-0-value">
<label for="edit-field-athlete-height-select-und-0-value">Height </label>
<input id="edit-field-athlete-height-select-und-0-value" class="edit-slide-with-style-slider form-text" type="text" maxlength="128" size="5" value="" name="field_athlete_height_select[und][0][value]" style="display: none;">
</div>
<div class="slide-with-style-slider ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all">
<div class="ui-slider-range ui-slider-range-min ui-widget-header" style="width: 0%;"></div>
<a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="left: 0%;">
</div>
</div>
</div>

Any help would be greatly appreciated. I'm not certain that the problem lies with this module, but since it works up until the point that I configure the Global Filter block, I am starting here. I have tried both the latest release and the dev release. I am using the most recent non-dev releases of the other modules.

Thank you!
Kirk

Comments

kirkofalltrades’s picture

Issue summary: View changes

Added version details

kirkofalltrades’s picture

Issue summary: View changes

Adding more detail...

RdeBoer’s picture

Hi Kirk,
Thank you for your report.
Hope to be able to look into this later this week.
Rik

RdeBoer’s picture

Hi Kirk,
So I'm a little confused as to what actually you'd like to achieve.

First of all if you just want a slider widget on your node field AND also want that same slider widget to appear as an exposed filter in a View, then you do NOT need Views Global Filter. The Slider widget should automagically appear, the moment you choose your height field as a filter in your View.
Views already allows you to put exposed filters in a block (make sure AJAX:Yes is set).

You only want Views Global Filter if you want to allow your visitors to globally set a (contextual) filter once and then pass that filter value to MULTIPLE Views across various pages on your site.

Secondly, I've just released a new version of the "Slide with Style" submodule. It has an additional styling "skin" and also some changes to the way things work internally. This may solve your issue.

Can you please try and report back how Select with Style 7.x-1.x-dev is working for you?

Thanks so much
Rik

kirkofalltrades’s picture

Assigned: Unassigned » RdeBoer

Hey Rik,

Thanks for your reply. Through my research I somehow came to the conclusion that I needed to use Views Global Filter in order to check that 'convert to range' box to be able to filter by range. I see I was wrong now, and when I setup the filter like normal on the view, it worked.

I'm not sure if a cache clearing or the upgrade to the dev version of Slide with Style did the trick, as it still wasn't working when I first set the filter up on the view. I downgraded to latest release of Slide with Style to see if I could confirm what fixed it, but was then receiving 'Notice: Undefined index: field_athlete_height_select_value in views_handler_filter->accept_exposed_input() (line 1260 of /home/pixels/public_html/kta/live/sites/all/modules/views/handlers/views_handler_filter.inc).'.

Since this isn't the Slide with Style issue queue, I'm going to leave it at this. I now have a working regular views exposed filter and I thank you for your support!

Thank you!

RdeBoer’s picture

Status: Active » Fixed

Hi Kirk,

I'll make the Views Global Filter project page a bit clearer as to when to use the module and when not.

Did you run /update.php after you upgraded the module code?
Apart from running the database schema updates (of which there aren't any in this case), /update.php also clears the caches, so you wouldn't have seen that error.

Anyway, great it's working for you.
You can now uninstall both the Views Global Filter and Views Contextual Range Filter modules -- makes your site that tiny bit faster and your admin and configuration screens that tiny bit cleaner to administer.

Thanks for your investigation.

Rik

RdeBoer’s picture

Issue summary: View changes

Just a little more for clarity.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.