Home › Forums › General Issues › Relationship field conditional logic › Reply To: Relationship field conditional logic
Hi,
Yes, conditional logic is what you want.
You would do something like:
if (get_sub_field(‘menu_type’) == ‘Featured’) {
// add your fields here
}
The function will vary depending on what you’re checking against (radio or checkbox), or what level your field sits at in your field group.
Check the docs for how reference either of those fields. That should get you started.
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.