Support

Account

Home Forums ACF PRO Get all values from user profile acf_form Reply To: Get all values from user profile acf_form

  • Set the priority of your filter to 20 so that it runs after ACF has saved the values

    
    add_action('acf/save_post', 'my_save_post', 20);
    

    Then get the values and add them the same way you’d get them for a template

    
    $body = '';
    $body .= 'Field Label: '.get_field('field_name', $post_id)."\r\n";
    $body .= 'field label 2:'.get_field('field_name_2, $post_id)."\r\n";
    

    You could probably also use either get_fields() https://www.advancedcustomfields.com/resources/get_fields/ or get_field_objects() https://www.advancedcustomfields.com/resources/get_field_objects/ and use a loop to add them to the body. The main difference between a template and what you’re doing is that you need to add the values to the string rather then display them.