Support

Account

Home Forums ACF PRO Can\'t get the name value to use $_POST Reply To: Can\'t get the name value to use $_POST

  • So for the way I want to use this. I’ll probably be best off using priority 20. Because I want the values after the post is submitted.

    So something like this?

    <?php// priority 1 or 20 depending on when you want this to run
    // if you use 1 then you need to look in $_POST['acf']
    // if you use 20 then you can use get_feild() and other acf functions
    add_action('acf/save_post', 'my_acf_save_post_action', 20);
    
    function my_acf_save_post_action($post_id) {
      if (get_post_type($post_id) != 'db_test') {
        // not our post type
        return;
      }
      $FirstName = get_field('voornaam_db');
        echo 'data' . $FirstName;
    }?>