Forums Forums Search & Filter Pro Using ACF select field for dropdown (label/value issue)

Viewing 10 posts - 31 through 40 (of 73 total)
  • Trevor
    #58789

    It depends on your theme as to where you can load scripts for the page.

    Anonymous
    #58797

    like this ? : wp-content\themes\your-theme-name\search-filter\results.php

    Anonymous
    #58799

    Hey Jeremie,

    the script I wrote will most likely need some modifications before this can work for you.
    If you could send me a link to your page (where you have your search form) I may be able to assist a bit if you need help and if it does not get too complicated. 😉

    I hope the guys from Designs & Code can provide a solution soon, so we can just use the plugin with ACF custom fields (values and labels).

    Warm regards,
    Sebastian

    Anonymous
    #58803

    Hi Sebastian

    Thanks a lot , this is the public page : http://ife.siter.fr/canevas/chercher/

    first list is aclassical taxonomy, but useless because only for standard post
    second list is the goood one, without the label, only numeric value
    third list is an other list, same problem

    does it help ?
    best regards
    Jeremie

    Anonymous
    #58817

    Hi Jeremie,

    I think the issue you are having is a bit different from mine.

    A short explanation may help:
    I am working with a custom field select field which basically has values and labels that are very similar just that the label for example shows “United States” where the value shows “united_states”. Because I can’t get the plugin to show the label “United States” in the front end of my site, I am running that script you saw to replace all underscores with a space and make all words begin with a capital letter. That way my drop down list shows the right country names instead of the label values.

    It seems that you can’t do the same thing in your case but maybe I misunderstand what you are trying to do. For sure you can’t get any jQuery/Javascript to show you the labels of your field from the database, at least not without jason or ajax code. So I assume my script won’t work for you and a solution could be very complicated to implement if it is not coming from the search and filter plugin.

    My script basically only changes the text that is already there, so it does not bring the labels from the database, it is only cosmetic.

    No

    Anonymous
    #58819

    … can’t edit my post … so the last word “No” was not meant to be in there 🙂

    Anonymous
    #58831

    Jeremie,

    I think in your case you could jQuery to replace/update the value of each option tag with a new value after the page is loaded. So when you know the desired value you could replace “field_57dfa59c4a32a (1)” with another text but you would have to do that for every possible value that shows up in your select field. If you know all the values, it is just some work to create the list and implement it into some jQuery code.

    The jQuery for that will have to look different from what I posted earlier.

    Trevor
    #58833

    I think that the issue may be that the field type in ACF that is being used is a complex one, whereas, right now (but we hope to support most of the complex ones very soon), we support only the basic ACF fields. I think this post looks at this issue:

    https://support.searchandfilter.com/forums/topic/filter-dropdown-options/#post-34366

    Ross Moderator
    #59004

    Hi all

    The problem is you are using ACF “relationship” field types. We’ve never officially supported them although the link Trevor provides does have a solution.

    Saying that, I’ve been working the past week on getting this integrated and am happy to say the current relationship field types will be supported. Finishing off testing now and will send both of you a copy of the dev version this evening.

    Thanks

    Anonymous
    #59019

    Hi all
    That would be a great improvment.
    Good luck.
    i will test it as soon you released it.
    Best regards

Viewing 10 posts - 31 through 40 (of 73 total)