range slider for numeric values not prices

Home Forums Product Support Forums Ajax Search Pro for WordPress Support range slider for numeric values not prices

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32667
    marcovandijk56
    marcovandijk56
    Participant

    Hi,

    is there a way to use a range slider for numeric values as defined in a ACF fieldtype defined as select.?
    I have values 0,1,2,3,4,5,6,7,8 and would like to present these in a slider in the frontend instead of a multiselect box or dropdown list.

    regards
    Marco van Dijk

    #32668
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I believe so, it should work. As far as the field has only a single value, it is very likely stored as a single value as well, in which case the range slider should work.

    Best,
    Ernest Marcinko

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


    #32674
    marcovandijk56
    marcovandijk56
    Participant

    Hi Ernest,

    unfortunate the field is a multi valued ACF field (product is suitable for child age 1,2,3,4 years or 1,2,3,4,5 for another product. The range slider is not able to deal with this kind of data.
    Any other suggestion how I could use a range slider to select these values?

    The alternative now is a multiselect dropdown with search so the customer can select the years , but this is not so user friendly.

    regards,
    Marco

    #32678
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    In that case it is probably not possible. You can try altering the query arguments via the asp_query_args filters. The post meta filters can be found under this key.
    The problem is, that the SQL between operator needs numeric values to work, so it will automatically cast the field value to an integer. As far as I know, there is no way of emulating a between operator to choose from multiple values.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.