Support Forum
Support › Meta Box Group › Perhaps another bug
Have a cloneable group field, add one, delete that one, and then add a new. Then all the taxonomy radio fields in that group field take the last option. Not an issue before deleting to 0 and then adding a new. Can you replicate?
[
'name' => __( 'Example', 'your-text-domain' ),
'id' => $prefix . 'example',
'type' => 'group',
'sort_clone' => true,
'clone' => true,
'max_clone' => 5,
'class' => 'repeatable-section',
'add_button' => __( 'Add new', 'your-text-domain' ),
'tab' => 'page_6',
'collapsible' => true,
'clone_empty_start' => true,
'default_state' => 'expanded',
'group_title' => '{#}. Paper',
'fields' => [
[
'name' => __( 'Example taxonomy', 'your-text-domain' ),
'id' => $prefix . 'Example taxonomy',
'type' => 'taxonomy_advanced',
'taxonomy' => ['type-of-research'],
'placeholder' => __( 'Select option..', 'your-text-domain' ),
'field_type' => 'radio',
'columns' => 12,
],
]
In mine there are a lot of different fields, it is long with conditional formatting. Which all works on the first group, or if you add additional groups without deleting to 0
Hello Yasmine,
Thank you for your feedback.
I can reproduce the issue on my demo site, if you click on the radio text, it will select the last option. If you click on the radio circle icon, it will select the correct one. Screenshot https://imgur.com/5WBz1hd
My issue is that I have styled each radio with CSS - https://imgur.com/xS7FmeE
Which works when its the first clone (can see in last screenshot) and for each subsequent clone, until one has been deleted. The issue only starts when one clone is deleted and for all the subsequent clones after the index changed. Eg - here I am trying to click "Applied research", but it clicks the last - https://imgur.com/nUEQkop
So clicking on the radio circle is not possible as a solution for me. I think it is an issue with the index changing? Will there be a fix?