This hook can be used to alter the confirmation redirect URL.
quform_confirmation_redirect_url_X_X
This hook is run for a single confirmation.
Example
12
3
4
5
| add_filter('quform_confirmation_redirect_url_1_1', function ($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; }, 10, 3); |
add_filter('quform_confirmation_redirect_url_1_1', function ($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; }, 10, 3);
- On line 1, replace the
1_1
with the confirmation unique ID
1
2
3
4
5
6
7 | function my_confirmation_redirect_url($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; } add_filter('quform_confirmation_redirect_url_1_1', 'my_confirmation_redirect_url', 10, 3); |
function my_confirmation_redirect_url($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; } add_filter('quform_confirmation_redirect_url_1_1', 'my_confirmation_redirect_url', 10, 3);
- On line 7, replace the
1_1
with the confirmation unique ID
Parameters
$url
–string
– the current confirmation redirect URL$confirmation
–Quform_Confirmation
– the confirmation instance$form
–Quform_Form
– the form instance
Accessing form data
quform_confirmation_redirect_url
This hook is run for all confirmations.
Example
1 2 3 4 5 | add_filter('quform_confirmation_redirect_url', function ($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; }, 10, 3); |
add_filter('quform_confirmation_redirect_url', function ($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; }, 10, 3);
1 2 3 4 5 6 7 | function my_confirmation_redirect_url($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; } add_filter('quform_confirmation_redirect_url', 'my_confirmation_redirect_url', 10, 3); |
function my_confirmation_redirect_url($url, Quform_Confirmation $confirmation, Quform_Form $form) { $url = 'https://www.example.com'; return $url; } add_filter('quform_confirmation_redirect_url', 'my_confirmation_redirect_url', 10, 3);
Parameters
$url
–string
– the current confirmation redirect URL$confirmation
–Quform_Confirmation
– the confirmation instance$form
–Quform_Form
– the form instance