RDotLee
RDotLee

Reputation: 1113

FormIt - redirect hook issue

ISSUE: I'm using FormIt and the redirect hook is not working for me.

It is redirecting to http://www.example.comPageName.html instead of http://www.example.com/PageName.html. It is not placing the forward slash after the page name.

Has anyone seen this issue before?

Here is my FormIt snippet.

[[!FormIt? &hooks=`email,redirect` &emailTpl=`MyEmailChunk` &emailTo=`[email protected]` &emailSubject=`Contact Us form submission` &redirectTo=`35` &emailFrom=`[email protected]`]]

Upvotes: 0

Views: 1653

Answers (2)

W. Shawn Wilkerson
W. Shawn Wilkerson

Reputation: 156

Actually the site_url variable needs to be checked in the System Settings.

Make sure you have a trailing slash.

Upvotes: 1

Vasis
Vasis

Reputation: 2281

URL generated in the following code

$url = $this->modx->makeUrl($this->formit->config['redirectTo'],$contextKey,$redirectParams,'full');

'full' means URL is absolute, prepended with site_url from config ( http://rtfm.modx.com/display/revolution20/modX.makeUrl ). Please check your site_url variable in /core/config/config.inc.php

Upvotes: 1

Related Questions