-
-
Save billerickson/bec9c90a0c5a3b1dc3217fbf3f50b596 to your computer and use it in GitHub Desktop.
This file contains 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 | |
/** | |
* Include Form Fields on Confirmation URL | |
* | |
*/ | |
function ea_wpforms_include_form_fields_on_confirmation( $url, $form_id, $fields ) { | |
$args = array(); | |
foreach( $fields as $field ) { | |
if( !empty( $field['value'] ) ) | |
$args['field_' . $field['id']] = $field['value']; | |
} | |
return esc_url_raw( add_query_arg( $args, $url ) ); | |
} | |
add_filter( 'wpforms_process_redirect_url', 'ea_wpforms_include_form_fields_on_confirmation', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment