Support

Account

Home Forums ACF PRO ACF Form Change input name Reply To: ACF Form Change input name

  • I’ve found wp remote get and wp remote post which run GET or POST requests, I’ve wrapped a GET URL string in acf/save_post as you’ve suggested like so

    function my_acf_save_post( $post_id ) {
        // bail early if no ACF data
        if( empty($_POST['acf']) ) {
            return;
        }
        // bail early if editing in admin
    	if( is_admin() ) {
    		return;
    	}
        // specific field value
        $field = $_POST['acf']['field_000000000'];
        $urlgetstring = "http://site.com/index.php?answer1=field";
    	
    	//send GET request
    	wp_remote_get( $urlgetstring );
    }
    // run before ACF saves the $_POST['acf'] data
    add_action('acf/save_post', 'my_acf_save_post', 1);
    

    Thanks for the point in the right direction!