Confirm page.. another URL use...

User 2660596 Photo


Registered User
15 posts

Hi is it possible to choose "redirect to another URL" but have the server part done by PHP $_SERVER['HTTP_HOST'] so the forms will work both in my localhost domain... DOMAINNAME.LOCAL and also when uploaded to DOMAINNAME.COM?

Mark .

User 187934 Photo


Senior Advisor
20,188 posts

Hi Mark,
Yes, Create your form with the confirmation redirect. After export go to the form.cfg,php and enter your php where your redirect appears in the code. It will look something like this.
"gotopage" : "http://mydomain.com/index.html",

Post back if you need more help with the setup.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2660596 Photo


Registered User
15 posts

Hi Eric,

Yes I'm still a bit stumped can't get it to work. I've tried the following at the gotopage line in form.cfg.php file:

"gotopage" : "http://".$_SERVER['HTTP_HOST']."/index.html"
and..
"gotopage" : "http://"$_SERVER['HTTP_HOST']"/index.html"
and..
"gotopage" : "http://"$_SERVER['HTTP_HOST']"/index.html"

None of these seem to work.
User 2660596 Photo


Registered User
15 posts

Oh Mean "thanks.php" not index.html typed that up wrong here
User 187934 Photo


Senior Advisor
20,188 posts

Ok, I did try anything but figured you wouldn't have any issues.
Did you try.
"gotopage" : "<? echo 'http://'.$_SERVER['HTTP_HOST'] . '/thanks.php' ; ?>",
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2660596 Photo


Registered User
15 posts

Hey Eric, that didn't work, i've tried a 100 different ways lol I'll just manually adjust the cfg file before uploading.

Many thanks.
User 187934 Photo


Senior Advisor
20,188 posts

I did a little more digging Mark and this can be handled on the formcontroller.cls.php page
goto line 110 and comment out this line
$url = Config::GetInstance()->GetConfig( 'settings', 'redirect_settings', 'gotopage' );

then on about line 124 add this
$url = "http://".$_SERVER['HTTP_HOST'] . "/thanks.php";


so you end up with this.
if( isset( $_POST[ CC_FB_EMBEDDED ] ) || Config::GetInstance()->GetSessionVariable( CC_FB_EMBEDDED ) )
{
$url = "http://".$_SERVER['HTTP_HOST'] . "/thanks.php";
echo '<html><script type="text/javascript">'
. 'top.location.href = "' . $url . '";'
. '</script></html>';

I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2660596 Photo


Registered User
15 posts

Hi Eric,

Thanks so much for that! I've just changed the code and tested on my local server, which I've FINALLY got to send mail out and it works a treat!!
User 345797 Photo


Registered User
48 posts

I have a similar problem. I want to direct the cancel and confirm to wordpress pages. For the cancel button, it is appending characters.
the code in the form.cfg.php is
.... n[_cart_summary_]\n<h2>Almost done! </h2>\n<p>Your order will not be processed until you click the payment button below.</p>\n<a id=\"fb_goback\"href=\"registration-not-complete?\">Cancel Payment</a></center>"

when I get tot he page I get abc.com/registration-not-complete%E2%80%8E

if I get rid of the extraneous characters and submit the page, I get the page I am expecting. If, on the other hand I have

...n[_cart_summary_]\n<h2>Almost done! </h2>\n<p>Your order will not be processed until you click the payment button below.</p>\n<a id=\"fb_goback\"href=\"NoPayment.html\">Cancel Payment</a></center>",

It works fine.

I would like to have all the pages in wordpress not some in the root directory and some in wordpress.

Thanks

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.