I have a form which I've setup to conditionally send out an email based on a field value and then process with additional custom code (#4).
The On Submit events are
1. Load User Info [GH]
2. Data To Session
3. Email [GH] - Condition = {status}::OFF
4. Custom Code
Theres more to the code but it keeps breaking at line 21
My code works when if($_POST['status'] == 'ON')
If the status is 'OFF' My conditional email is sent out and I get the following error:
Fatal error: Cannot use object of type JParameter as array in /var/www/vhosts/mysite.com/httpdocs/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(19) : eval()'d code on line 21
Line 21 = if(!empty($value))$params[$key] = $value;
I can use the curl action and post my form to an external file with the same code thats in my custom code action (#4) and it works (no emails are sent though).
Does anyone have any suggestions on what the issue is? I've read a few posts that seem to point to Joomla and the use of JParameter depreciating.
Thanks
The On Submit events are
1. Load User Info [GH]
2. Data To Session
3. Email [GH] - Condition = {status}::OFF
4. Custom Code
<?
//echo "<LI>HEX".$hex_string;
function strToHex($string){
$hex = '';
for ($i=0; $i<strlen($string); $i++){
$ord = ord($string[$i]);
$hexCode = dechex($ord);
$hex .= substr('0'.$hexCode, -2);
}
return strToUpper($hex);
}
if($_POST['status'] == 'ON')
{
$sso_string = "SML".$_POST['MembershipID']."X".$_POST['ClientID']."EL";
$hex_string = strToHex($sso_string);
header('Location: https://mysite.com/?ocx='.$hex_string);
}
else{
while(list($key, $value) = each($_POST))
{
if(!empty($value))$params[$key] = $value;
}
Theres more to the code but it keeps breaking at line 21
My code works when if($_POST['status'] == 'ON')
If the status is 'OFF' My conditional email is sent out and I get the following error:
Fatal error: Cannot use object of type JParameter as array in /var/www/vhosts/mysite.com/httpdocs/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(19) : eval()'d code on line 21
Line 21 = if(!empty($value))$params[$key] = $value;
I can use the curl action and post my form to an external file with the same code thats in my custom code action (#4) and it works (no emails are sent though).
Does anyone have any suggestions on what the issue is? I've read a few posts that seem to point to Joomla and the use of JParameter depreciating.
Thanks