Support

Account

Home Forums General Issues Dynamic value for message field Reply To: Dynamic value for message field

  • Not updating the value in the DB you’ll need to add some conditionals in your load field filter so that it is not altered when editing the field group.

    
    add_filter('acf/load_field/name=field_name', 'alter_message');
    function alter_message($field) {
      $post = get_queried_object();
      if (isset($post->post_type, $post->ID) && $post->post_type != 'acf-field-group') {
        // alter the field
      }
      return $field;
    }