Support

Account

Home Forums Backend Issues (wp-admin) Group Field hidding because of checkbox

Solved

Group Field hidding because of checkbox

  • Hi,

    I ran into some strange behavior when using a taxonomy relation rule to display a group field.
    If I put a taxonomy field populated by another taxonomy and using checkbox the group field hiddes.
    This behavior only works with checkboxes.

    I think that it’s a javascript bug I am right?

  • Hi @dahousemix

    Sorry, but I am finding it very difficult to understand the issue you are posting.
    Can you please clearly explain the issue step by step?

    Thanks
    E

  • Sorry, I’ll try to make it simple.

    For example, I have a custom type post with 3 custom taxonomies.
    I created a Field Group in ACF with the location rule to show up only if the first taxonomy is “Manga”. (see below)

    Location condition

    Then I added a taxonomy field populated by another custom taxonomy and set the type to “checkbox”.

    taxonomy field

    So now when I create or edit a custom post, I choose the taxonomy “Manga” so that my Field Group show up.
    But after that, if I use the checkbox field, my Field Group just hides again.

    Field Group on a custom post

  • Hi @dahousemix

    Thanks for the detail and screenshot, very clear!

    Is the taxonomy field within the field group that has the location rule for ‘Manga’?

    Perhaps the issue is that when you trigger a change on the taxonomy checkbox field, ACF looks to see if the location rule matches and hides the field group?

  • Hi @elliot,

    Yes the taxonomy field is from the field group that has the location rule for ‘Manga’.

    The thing is that the taxonomy field and the taxonomy location rule are different custom taxonomy tags but from the same taxonomy category.

    I think that with checkbox, ACF looks for a change of taxonomy for the location rule regarless of the taxonomy group or tag. I suggest it search only for a tag change.

  • Hi @dahousemix

    What do you mean by “taxonomy group or tag. I suggest it search only for a tag change.”.

    I don’t quite understand these terms.

    Thanks
    E

  • Sorry I’m quite new to wordpress so maybe I don’t use the right words.

    In my case I register 2 custom taxonomies by diong this:

    register_taxonomy('genres_bdd', 'bdd',array('hierarchical' => false, 'label' => 'Genres', 'query_var' => true, 'rewrite' => true));
    register_taxonomy('categories_bdd', 'bdd',array('hierarchical' => true, 'label' => 'Cat├ęgories', 'query_var' => true, 'rewrite' => true));

    Let’s say that the taxonomy “Manga” in my location rule belongs to “categories_bdd”.
    The taxonomy field in my field group populate with the value from the taxonomy “Genres”.

    Then if I write a post with the taxonomy “Manga” my field group appears: normal.
    But then if I check one value in the taxonomy field inside the field group, it hides.

  • Hi @dahousemix

    Thanks for the above info, but I am still confused as to what the issue is. Perhaps it is becuase your screenshots show a non english language, I am unable to understand what the location rules are for your field group.

    If I understand correctly, the field group should not show unless the current post has selected the ‘Manga’ genre. Can you explain how this field group is originally appearing? ad then dissapearing from the post screen?

    Can you also identify what the exact issues. For instance:
    1. The field group should not be showing at all on initial load…

    Thanks
    E

  • Also,

    It would be great if you could demonstrate how I can setup your scenario. Can it be replicated with the default post category taxonomy?

    If so, can you explain what location rules / field groups / fields I need to setup and what actions I need to follow?

    Thanks
    E

  • @elliot

    Sorry for the long wait.

    It seems that it doesn’t happend anymore, I think that’s because I created a post before setting my field group.
    I’ll let you know if this happen again.

    Thanks again.

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

The topic ‘Group Field hidding because of checkbox’ is closed to new replies.