Hi,
I'm trying to use the following in the form redirect url
I have the following code in the form JavaScript:
But can't get it to work
Is this even an option???
thanx again
mark
I'm trying to use the following in the form redirect url
index.php?option=com_chronocontact&chronoformname=settings&tmpl=component&cf_id=<?php echo $cfId;?>
I have the following code in the form JavaScript:
<?php
$user =& JFactory::getUser();
$usr = $user->get('id');
$database =& JFactory::getDBO();
$queryId = "SELECT cf_id, cf_user_id FROM `jos_chronoforms_settings` WHERE `cf_user_id` = '$usr' " ;
$database->setQuery( $queryId );
$resultId = mysql_query($queryId) or die(mysql_error());
$rowId = mysql_fetch_array($resultId) or die(mysql_error());
$cfId=$rowId['cf_id'];
?>
But can't get it to work
Is this even an option???
thanx again
mark
Hi Mark,
You can't use PHP in the Redirect URL box so that won't work. But you can set a Redirect URL in the OnSubmit Code boxes. There are several threads here with the code for that and the code is in The ChronoForms Book (which I think you have) in the article on page 151.
The other code you have is PHP, not JavaScript so won't work in the Form JavaScript box.
Bob
You can't use PHP in the Redirect URL box so that won't work. But you can set a Redirect URL in the OnSubmit Code boxes. There are several threads here with the code for that and the code is in The ChronoForms Book (which I think you have) in the article on page 151.
The other code you have is PHP, not JavaScript so won't work in the Form JavaScript box.
Bob
This topic is locked and no more replies can be posted.