Whats wrong with that? And how can i directly redirect from a php script to a chronoform?The chronoform which i want to redirect to is called 'login'cheers Dennis"> Template override com_users/login - Forums

Forums

Template override com_users/login

Rapdrei 15 Oct, 2014
Hi,

i just intend to create a template override for com_users/login to a custom login form i already created with chronoforms.

My first attempt was a php redirect which didnt work and showed me a "404 - Component not found" error.

Here is my redirect code from /com_user/login/default.php :

<?php

$mainframe =& JFactory::getApplication();

$mainframe->redirect('index.php?option=com_chronoforms&chronoform=login');

?>	


Whats wrong with that? And how can i directly redirect from a php script to a chronoform?

The chronoform which i want to redirect to is called 'login'

cheers
Dennis
GreyHead 16 Oct, 2014
Hi Rapdrei,

That should work if you are using CFv4 - if you have CFv5 it needs to have option=com_chronoforms5

Today I'd probably use this in CFV5
<?php
$app = JFactory::getApplication();
$app->redirect( JUri::root().'index.php?option=com_chronoforms&chronoform=login' );
?>

Bob
Rapdrei 25 Nov, 2014
Hi GrezHead,

thank you for your help!

<?php
$app = JFactory::getApplication();
$app->redirect( JUri::root().'index.php?option=com_chronoforms5&chronoform=login' );
?>


Unfortunatly the code is not working for me (using CF5). Somehow it tells me that my formname cannot be empty. I doublechecked wether the forname field is set and thus got no idea why i receive this error.

Do i miss something??

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