Hi -
Chronoforms has been working great, but today I put some code into the form code area and when I went to save it (or apply) chronoforms manager not only didn't save but redirected me to my joomla page that I was entering into the form code entry. I added this code to the form entry
<?php
$user =& JFactory::getUser();
$db =& JFactory::getDBO();
$query = "SELECT count(*)
FROM `jos_chronoforms_app_code_company`
WHERE `cf_user_id` = $db->Quote($user->id) ";
$db->setQuery($query);
$count = $db->loadResult();
If (! $count) {
header("Location: http://www.appcodestore.com/index.php?option=com_content&view=article&id=102");
exit;
}
?>
When I attempted to save this information the save does not occur and chronoforms sends me to the header location in the code above. For now I am manually changing the database record, but how can I get chronoforms to stop doing this and just save the form?
Thanks
Chronoforms has been working great, but today I put some code into the form code area and when I went to save it (or apply) chronoforms manager not only didn't save but redirected me to my joomla page that I was entering into the form code entry. I added this code to the form entry
<?php
$user =& JFactory::getUser();
$db =& JFactory::getDBO();
$query = "SELECT count(*)
FROM `jos_chronoforms_app_code_company`
WHERE `cf_user_id` = $db->Quote($user->id) ";
$db->setQuery($query);
$count = $db->loadResult();
If (! $count) {
header("Location: http://www.appcodestore.com/index.php?option=com_content&view=article&id=102");
exit;
}
?>
When I attempted to save this information the save does not occur and chronoforms sends me to the header location in the code above. For now I am manually changing the database record, but how can I get chronoforms to stop doing this and just save the form?
Thanks
Hi dawgfather,
The current ChronoForms release has a clever 'feature'that causes this problem. The current workaround is to add the following line as the first line of any PHP in the Form HTML box.
Bob
The current ChronoForms release has a clever 'feature'that causes this problem. The current workaround is to add the following line as the first line of any PHP in the Form HTML box.
<?php
if ( !$mainframe->isSite() ) { return; }
. . .
This prevents ChronoForms from evaluating the PHP in the admin area of the site. Bob
Bob -
Thanks - Works Great - I was worried the world was spinning out of control
Thanks - Works Great - I was worried the world was spinning out of control
This topic is locked and no more replies can be posted.