Skip Navigation

[Resolved] Slider search

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by fahimS-2 1 year, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2607781

I have a Toolset Archive. I have implemented a custom search with custom field. And the data type of that field is numeric. I have kept Between logic for that field. But I want to let the users set the value of the field with a slider. How can I do that?

#2607807

Hello,

There isn't such a built-in feature within Toolset plugins, you will try custom JS/CSS codes, for example, if your website supports Bootstrap 4, you can follow Bootstrap document to style the number fields as Range field:
hidden link

#2607851

I have selected 'Toolset should load Bootstrap 4' option in Toolset settings.
1. Can I implement the slider functionality now?
2. As I have selected that option, can I use bootstrap classes anywhere on my website?

Looking forward to your reply.
Thanks.

#2607871

I tried to implement the slider but failed every time. Would you mind showing me how I can implement the slider?

#2608075

Here is a sandbox website:
Login URL: hidden link

1) post view:
hidden link
in section "Search and Pagination", lines 3~5, add a HTML div tag:

<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<script src="<em><u>hidden link</u></em>"></script>
<div class="test-number-slider-range"></div>

2) In section "JS editor", add below codeS:

jQuery( document ).ready(function() {
    jQuery( ".test-number-slider-range" ).slider({
      range: true,
      min: 0,
      max: 500,
      values: [ 0, 300 ],
      slide: function( event, ui ) {
        jQuery( "[name='wpv-wpcf-test-number_min']" ).val( ui.values[ 0 ] );
        jQuery( "[name='wpv-wpcf-test-number_max']" ).val( ui.values[ 1 ] );
      }
	});
});

Test it in frontend:
hidden link

It works fine, for your reference.

#2610165

My issue is resolved now. Thank you!