helgatheviking / Radio-Buttons-for-Taxonomies

Turn any WordPress taxonomy into a list of radio buttons, which forces users to select only 1 term!
53 stars 28 forks source link

Breaks ACF Post Taxonomy conditionals #71

Open thelucre opened 4 years ago

thelucre commented 4 years ago

Hey there! Such a useful plugin. I ran into an issue today with ACF Post Taxonmy conditional logic to show/hide fields depending on which category is selected.

This is working prior to the Radio-Buttons-for-Taxonomies being installed. After adding the plugin, the callback doesn't trigger an update to show relevant ACF Field Groups.

Here's a gif of the issue

Any thoughts?

helgatheviking commented 4 years ago

Hi! Glad you dig the plugin. I had another compatibility with RB4T and ACF.. #52 but that was in Gutenberg (which is still over my head) while this still looks like the old editor, is that correct?

What is supposed to be happening in the gif? My guess is that ACF might be listening for a change event on the traditional checkbox element and their selector is not selecting a radio button change.

This plugin is kinda low priority for me right now, so not sure it's something I'll be able to fix any time soon. Very open to PRs though if you can figure it out.

helgatheviking commented 3 years ago

Finally looked at this while I was looking at another ACF compat issue I am pretty sure ACF isn't finding the taxonomy data that is normally sends via AJAX to check on the conditional state because it's looking for the inputs to have the default tax_input name, but the radio inputs are renamed as radio_tax_input.

Two options, 1. they'd either need to also look for radio_tax_input to relay that data

  1. I need to switch the input name back to the default tax_input which could present problems with the save routine. At a minimum, I'd have to modify it to find an alternate way to detect when I'm saving a radio taxonomy versus a regular taxonomy.

FYI, this seems to function ok in the block editor. https://share.getcloudapp.com/E0uY0X0n

helgatheviking commented 3 years ago

Granted this is super late, but if you're up for testing... I'm trying it out here: https://github.com/helgatheviking/Radio-Buttons-for-Taxonomies/tree/issues/71-acf

papazetis commented 2 years ago

@helgatheviking Any updates on that? It looks like the issue hasn't been resolved yet.

helgatheviking commented 2 years ago

@papazetis no update on my end. I don't have availability to look into this. Looks like there was #99 if you want to pick it up for testing.