diff --git a/search_api_ranges.module b/search_api_ranges.module index 28a2aca..2b06d97 100644 --- a/search_api_ranges.module +++ b/search_api_ranges.module @@ -275,7 +275,7 @@ function search_api_ranges_forms($form_id, $args) { */ function search_api_ranges_block_slider_view_form($form, &$form_state, $variables) { $form = array(); - + // Add JS. $module_path = drupal_get_path('module', 'search_api_ranges'); $form['#attached']['library'][] = array('system', 'ui.slider'); @@ -356,7 +356,7 @@ function search_api_ranges_block_slider_view_form($form, &$form_state, $variable return $form; } - + /** * Handle slider block submit */ @@ -380,7 +380,7 @@ function search_api_ranges_block_slider_view_form_submit($form, &$form_state) { $exists = FALSE; $split_path = explode('/', $path); foreach ($split_path as $key => $value) { - if (!($key % 2) && $value == $range_field) { + if ($value == $range_field) { $exists = $split_path[$key + 1]; } } @@ -640,4 +640,4 @@ function search_api_ranges_map_label(array $values, array $options) { } return $map; -} \ No newline at end of file +}