This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Range Slider: Automatically set "from" and "to" value based on data?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Range Slider: Automatically set "from" and "to" value based on data?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14731
    tobyytobyy
    Participant

    Hello,
    i want to implement a range slider for my job search. the slider shows the “yearly salary” of available jobs.

    now the problem is, that yearly salaries are normally up to 50.000€, but in some special cases could be 100.000€+.

    i don’t want the slider to always show 100.000 or more as the maximum, when all the jobs listed are below 50.000 – so can i somehow set the min & max value automatically – based on current values?

    i guess this feature is not available – but maybe you can point myself in the right direction so i can code it myself.

    my first try would be to set a script to find the current min & max value, and then change the values for ‘asp_f_range_from’ and ‘asp_f_range_to’ in the “ajaxsearchpro” table in the database. but maybe you can point me in a better direction – or maybe there are some hooks that i could use?

    thanks for your help!
    tobias

    #14737
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Tobias,

    There is actually a filter that is executed for each item in the custom field filters list, before it is outputted. To change the properties of the filters, you can use that.

    I’ve made an example, which will change the range slider ‘from’ and ‘to’ values to 10 000 and 100 000:

    Basically you can use this to as a base for your needs.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.