Support

Account

Home Forums Feature Requests Dynamically Set ACF Field Default Value Reply To: Dynamically Set ACF Field Default Value

  • Nevermind. I answered my own question. I needed to get rid of “use” and format it like so:

    function my_acf_load_field( $field ) {
    		
         $address = get_field('center_address', 342);
    		
         $field['default_value'] = $address;
         return $field;
    		 
    }
    
    add_filter('acf/load_field/name=contact_person', 'my_acf_load_field');