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?

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14731
    tobyy
    tobyy
    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 Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.