iphorm_success_redirect_url

This hook is run when retrieving the success redirect URL.

iphorm_success_redirect_url

This hook is run for all forms when the success action is set to redirect to another page.

Example

1
2
3
4
5
6
7
8
function my_success_redirect_url($url, $form)
{
    // Custom code example
    $url = 'http://www.example.com/thank-you';
 
    return $url;
}
add_action('iphorm_success_redirect_url', 'my_success_redirect_url', 10, 2);
function my_success_redirect_url($url, $form)
{
    // Custom code example
    $url = 'http://www.example.com/thank-you';

    return $url;
}
add_action('iphorm_success_redirect_url', 'my_success_redirect_url', 10, 2);

Parameters

  • $url – the current URL redirect string
  • $form – the iPhorm instance

Accessing form data

See Getting form values

iphorm_success_redirect_url_X

This hook is run for a single form when the success action is set to redirect to another page, replace X with the form ID.

Example

1
2
3
4
5
6
7
8
function my_success_redirect_url($url, $form)
{
    // Custom code example
    $url = 'http://www.example.com/thank-you';
 
    return $url;
}
add_action('iphorm_success_redirect_url_1', 'my_success_redirect_url', 10, 2);
function my_success_redirect_url($url, $form)
{
    // Custom code example
    $url = 'http://www.example.com/thank-you';

    return $url;
}
add_action('iphorm_success_redirect_url_1', 'my_success_redirect_url', 10, 2);

Parameters

  • $url – the current URL redirect string
  • $form – the iPhorm instance

Accessing form data

See Getting form values

Other guides using this hook

Still having trouble? Head over to the forums.

Forums