• Resolved dmkrtz

    (@insane2803)


    This is pretty much a carbon copy of this: https://www.ads-software.com/support/topic/taxonomy-terms-load-values-not-working-with-radio/ which was resolved in an update, but for me it’s exactly the same.

    When having “checkbox” selected, the list is being selected correctly – but if “radio” is selected, it doesn’t select correctly.

    see here: https://abload.de/img/screenshot2022-01-061cdj18.png

    Edit:
    maybe I should explain it a bit better. So my users should be able to change their categories afterwards but I don’t want them to add every possible category.
    So the hierarchy would be as follows:
    Main Categories (radio)
    – Bikes
    – Tracks
    – Rider
    Then once the user e.g. selects “Tracks”, they should be able to choose between
    Track Categories (checkbox)
    – Supercross
    – Motocross
    – Enduro
    Once that’s done they also have the ability to select its difficulty
    Track Difficulty (select)
    – Beginner
    – Intermediate
    – Pro

    So I should get these categories selected: https://abload.de/img/screenshot2022-01-061qdjya.png

    unfortunately as I just realized does ACFE “overwrite” any existing categories once a radio field exists. But I want to limit a selection of X terms where only ONE of them can be used instead of all three. This is needed to prevent spam and incorrect categories. I have a frontend submission form for users made with Gravity Forms which does exactly what I am aiming for, just want to have the “limited” ability for users to change these things afterwards. Hope that’s more clear now. ??

    OK so a temporary fix is to use a select field instead of a radio button, does the job the same way so that’s ok for me. But maybe is the radio thing still not intended?

    • This topic was modified 2 years, 10 months ago by dmkrtz.
    • This topic was modified 2 years, 10 months ago by dmkrtz.
    • This topic was modified 2 years, 10 months ago by dmkrtz.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    Well, the “Radio” field type works with the “Load Terms” setting in the Taxonomy Terms Field. The problem is that you filter the choices to only display specific sub categories.

    There are multiple categories set on the current post, including top level categories, and ACF requires to have only one value in order to correctly display an ACF Radio field. So the system takes the first selected category (in your case “Uploads”), and since it doesn’t exists in the allowed sub categories radio choices (“Beginner”, “Intermediate”, “Pro”), it just select the first choice by default (“Beginner”).

    The ACF Select field doesn’t have that issue because ACF allows multiple values in there (but not in Radio).

    It’s kinda an edge case, but I can understand how that can be useful here. I’ll add an enhancement in the next patch in order to recognize filtered choices when using the Radio field type with the “Load Terms” setting.

    In the meantime, you can apply the enhancement by replacing everything in the file /acf-extended/includes/fields/field-taxonomy-terms.php with this source code here.

    Hope it helps!

    Have a nice day!

    Regards.

    Thread Starter dmkrtz

    (@insane2803)

    Thank you very much for your quick reply! (First time I got a reply for a support ticket LOL)

    I will replace the code once my website is back online, currently undergoing a host migration but I will definitely give it a try.

    And thanks for your explanation! Great work on the plugin and support in general. ??

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    You’re welcome! Let me know if that correctly fixed your issue.

    Have a nice day!

    Regards.

    Thread Starter dmkrtz

    (@insane2803)

    Sorry for the late reply, just wanted to say that this worked like a charm! I’ve now had the time to fully move to a category selection with conditional logic. Only issue I’m facing right now is that I’d like to get rid of the leading “- ” for sub-categories.

    Any way this would be possible? ??

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Taxonomy Terms “Load Terms” not working with radio buttons’ is closed to new replies.