Forums Forums Search & Filter Pro Change "Start meta key" and "Value postfix" dynamically

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #225832

    Hello, Search and Filter Pro team!

    First of all, I want to congratulate you on this wonderful plugin! I have tested multiple filter/search plugins and this is the only one that was really able to work with Elementor Pro properly.

    I’ve created my custom search bar with a few CSS tweaks and it looks fantastic!

    A quick background:

    One of my “post meta” range slider fields is called “length” and the value is in meters. It works perfectly as it is right now. It uses an ACF custom field called “length_meters”.

    My question is as follows:

    Do you have a hook/filter I can use to dynamically change that same range field to use another ACF field called “length_feet” and change the value postfix to “ft”?

    Reasoning:

    People want to view posts in meters or feet. It would be ideal if I could keep the same range field and simply switch out the source ACF field when a button/link is clicked.

    Thank you! I really appreciate it!
    Armando J. Perez Carreno

    Trevor
    #225839

    It isn’t possible to dynamically change the source of the field like that, sorry. Given the way our filter currently handles ranges, you would need to use one or the other.

    Anonymous
    #225854

    Wow! Thank you for your fast response, Trevor!

    What do you think would be more efficient:

    1. I can duplicate the form to have one form for feet and one for meters. Then, I can conditionally render the appropriate form in PHP if the cookie is set for meters or feet.

    or

    2. I can have both meters and feet range field in the same form and dynamically hide one or the other using JS when the cookie is set for meters or feet.

    I really appreciate your time,
    Armando J.

    Trevor
    #225860

    The latter would not work, so if you are able to do the former, that would be best.

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