Home › Forums › ACF PRO › Connect option page to field group via PHP › Reply To: Connect option page to field group via PHP
You need to do this with PHP. There is an undocumented filter
add_filter('acf/validate_field_group', 'special_location_rules', 20, 1);
function special_location_rules($group) {
if ($group['key'] != 'YOUR FIELD GROUP KEY HERE') {
return;
}
// set conditional logic
return $group;
}
Create a field group with several rule groups (ORs) and export it so that you can see how $group['conditional_logic']
is organized. It is a nested array that holds the AND/OR logic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.