Home › Forums › Add-ons › Options Page › Dynamically add message based on another field value › Reply To: Dynamically add message based on another field value
remove ‘option’ from here
this
$canb_name = get_sub_field('canb_notification_bar_name','option');
should be
$canb_name = get_sub_field('canb_notification_bar_name');
I’m not sure that is causing your error, but that’s the only thing I can see wrong. For some reason your code is causing an infinite loop.
Also, you should be using the acf/prepare_field hook to modify the field message. While acf/load_field can be used here it can have unintended side effects.
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.