Default Value for Select Option for Custom Field

Forums › Forums › Search & Filter Pro › Default Value for Select Option for Custom Field

Viewing 2 posts – 1 through 2 (of 2 total)
  • Anonymous
    #94513

    Hello,

    I have question about working with Custom field. The first I a have to thank you for your great plugin. I really like it. However, I wonder if it is possible to show the default value from custom field (ACF)?

    For example my field is : Product Type (as an select field), and this value has only 1 option to choose, so that mean this field will has only 1 value.

    So, Instead of the filter dropdown that now it is showing “All items”. Can I change to display only that value from the custom field?

    I hope you understand what I am talking about 🙂

    You can check my demo page : https://buksohn.com/2017/eginter/result-for-mccb-gt-ac
    and see the filter “Product Code” that for now I have only one value, “Ex9M”. So, I want to show this Ex9M instead of showing word “All items”.

    Thank you,

    Trevor
    #94514

    Hi

    This has been asked for before, so it IS something we may be considering for a future release, but is not included in the plugin at this time. It is possible to do this using custom javascript (but I do not have any examples that I can give you). Also, the code would have to check if the field already has a setting before changing it.

    However, will it always have only one value available, or is this only for now? If it will only ever have one value, so that in the posts the field is either empty or has that one value, then there is no need to have the field in the form, instead you can set this on the Post Meta settings tab as a condition. This would then exclude all posts that did not have that one value or where that field was empty.

Viewing 2 posts – 1 through 2 (of 2 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.