Client wants this on the front end:
Address 1: [ form field ]
Address 2: [ form field ]
Address 3: [ form field ]
But when I go to view the variables in the "*Email Results to set Address(es)" field editor, it shows all of the Addresses as the same variable:
$address Field: Address line 1:
$address Field: Address line 2:
$address Field: Address line 3:
The email sent uses the same data (from the "Address line 1" field) for all 3 fields.
I got around this by changing the fieldnames, but thought I'd flag this in case it helps with the dev of the new Feedback Form module, or others having the same problem.
Cheers,
C*
Bug with Feedback Form variables
-
niq
Re: Bug with Feedback Form variables
I found the same problem. I found a sort-of fix around (without needing to change the field names). I edited the MakeVar function in the DispositionEmailBase.class.php file (line 59) changing the length of the variable names 40 characters.
I found this worked for most of the form fields I changed, but I still get a problem with any variable name that begins the same way. The following 2 fields return the same value for example: 'Surname M' and 'Surname F'. A fix would be great.
Code: Select all
function MakeVar($string)
{
$string = strtolower(preg_replace('/\s+/','_',$string));
$string = preg_replace('/\W/','',$string);
if (strlen($string) > 40)
{
$string = substr($string,0,40);
$pos = strrpos($string,'_');
if ($pos !== false)
{
$string = substr($string,0,$pos);
}
}
return $string;
}
