Forums

Redirect on Dinamic URL

Conforti 13 Oct, 2013
Hi,
my name is Riccardo, i'm a new member of this forum and a new user of Chronoform.
I have a little question. It's possible control the URL address with a field of my form?

Example: There is a field in my form called web site (his field name is=input_text_website)
I would like that the redirect URL is a similar thingh = http://[input_text_website]/administrator.

It's possible to do?

Thanks for all your help.
Riccardo
GreyHead 13 Oct, 2013
Hi Riccardo,

Yes you can do that in a custom code action (make it the last action though):
<?php
$app =& JFactory::getApplication();
$url = "http://{$form->data['input_text_website']}/administrator";
$app->redirect($url);
?>


Bob
Conforti 13 Oct, 2013
Hi Bob,
thank you very, very much! Great, works!
Chapeau!

Riccardo
This topic is locked and no more replies can be posted.