The following code is used for redirecting to a third party site
add_action( 'wp_footer', 'ca_redirect_form',9999);
function ca_redirect_form() {
$thankyoulink = get_field('redirect_url', 'option');
$wpcf7 = WPCF7_ContactForm::get_current();
$form_id = $wpcf7->id;
?>