Last active
March 15, 2022 08:05
-
-
Save New0/c27d8f253ddfbc4ce612b8fd67a0c44c to your computer and use it in GitHub Desktop.
Caldera Forms redirection processor using window.location to open a new window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: CF custom redirection | |
* Description: Customization for the Caldera Forms redirect processor. | |
* Version: 0.0.1 | |
* Author: New0 | |
* Author URI: https://github.com/New0 | |
*/ | |
add_action('caldera_forms_redirect', function($type, $url, $form){ | |
//CHANGE TO MATCH THE FORM IF | |
if( $form['ID'] === 'CF5a95cf4caa782' && $type === 'complete' ){ | |
?><script type="text/javascript">window.open('<?php echo $url ?>')</script><?php | |
exit; | |
} | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment