Hello.
There seems to be a bug in FormAuto.php between lines 1253 and 1272. The problem lies with the form field replacement in the email template in case of a 'select' field. The value that is inserted in the mail is only the label of the select field and not the value. Moving the select case on line 1256 to 1292 fixes the problem, but I assume this eliminates the option of having multiple values from one select field.
In addition on line 1263 there seems to be a whitespace between 'array' and the opening parenthesis.
Thank you for an otherwise great module!!
Regards
Jesper.
Code:
switch ($field['type'])
{
case 'checkbox':
case 'select':
case 'radio':
$i = 0;
$value = '';
$options = deserialize($field['options']);
$values = is_array($arrValues[$key]) ? deserialize($arrValues[$key]) :
array ($arrValues[$key]);
foreach ($options as $id=>$option)
{
if (in_array($option['value'], $values)) {
$value .= ($i>0 ? ', ' : '') . $option['label'];
$i++;
}
}
break;
Bookmarks