The first issue I had was how to link checkboxes. When selecting one checkbox another one from another field should be selected as well.
What should be smart?
What do you need?
x Smart home Station
x Lights with WLAN
• electric doors
• electric windows
When the user is selecting “lights”, the first and second checkbox should be checked. I have achieved this with jQuery and Click Trigger but it has its problems and is not reliable.
Try 1: trigger click on input.
Fail: does not trigger the “selected” class event and connected conditions of the field group of acf.
Try 2: trigger click on label.
Fail: does trigger acf events but does not work properly in Safari / on iPad and not on hidden field.
So I can rebuild the functions and combine clicking and adding classes but I wanted to do this with acf features like
acf.getField('field_62d4abc0fbfd4').set('value', array(1, 3)) or
acf.set('field_62d4abc0fbfd4', array(1, 3))
So I’d like to link checkboxes but the feature I’m looking for is the properly and reliably trigger a checkbox item while clicking on a different element/button/item.