# Redirecting contact form to success page

**URL:** <https://forum.getkirby.com/t/redirecting-contact-form-to-success-page/35608>\
**Category:** Questions\
**Tags:** v5\
**Created:** [September 10, 2026, 12:15pm UTC](https://forum.getkirby.com/t/redirecting-contact-form-to-success-page/35608 "2026-09-10T12:15:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jokedewinter](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jokedewinter/32/582_2.png) [@jokedewinter](https://forum.getkirby.com/u/jokedewinter)\
**Post date:** [September 10, 2026, 12:15pm UTC](https://forum.getkirby.com/t/redirecting-contact-form-to-success-page/35608/1 "2026-09-10T12:15:12Z")

</div>

Hi,

I have a contact form that on successful submission redirects to a thank you page. Both the contact page and the thank you page are in the root of the site. I am using the contact form mechanism in one of the cookbook recipes.

When all the form date has validated ok I have this section in the form controller:

```auto
            // no exception occurred, let's send a success message
            if (empty($alert) === true) {
                $success = 'Your message has been sent.';
                $data = [];
                go('contact-thank-you');
            }

```

On my local environment the go part works. But on the live site I have an error:

```auto
go(): Argument #1 ($func) must be a valid callback, function "contact-thank-you" not found or invalid function name

```

Any ideas where I am going wrong?

Thanks.

---

<div class="post-metadata">

**Author:** ![ahmetbora](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ahmetbora/32/11671_2.png) [@ahmetbora](https://forum.getkirby.com/u/ahmetbora)\
**Post date:** [September 10, 2026, 7:31pm UTC](https://forum.getkirby.com/t/redirecting-contact-form-to-success-page/35608/2 "2026-09-10T19:31:24Z")

</div>

Hi,

This doesn’t look like a Kirby issue. The error message gives it away:

```auto
go(): Argument #1 ($func) must be a valid callback

```

Kirby’s `go()` helper takes a URL string, not a callback. So the `go()` running on your live site isn’t Kirby’s. Something in that environment defines a global `go(callable $func)` (a PHP extension or a library) and Kirby’s helper never gets registered. That’s also why it works locally but fails on the server.

You can confirm it with:

```php
<?php
$go = new ReflectionFunction('go');

echo $go->isInternal()
	? 'internal, extension: ' . $go->getExtensionName()
	: 'userland, file: ' . $go->getFileName();

```

If it points anywhere other than `kirby/config/helpers.php`, that’s your conflict.

As a workaround you can call the class directly instead of the helper:

```auto
\Kirby\Cms\Response::go(page('contact-thank-you')->url());

```
