Support

Account

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.