Forums

multiple cc in special fields don't work

manu37 04 Oct, 2007
Hello,

Chronoforms v2.3.4

Form Management->special fields->cc field:

multiple values , either separated with comma or semicolon, from form fields don't work.

regards

manu
GreyHead 04 Oct, 2007
Hi manu37,

I confirmed that in the code, I guess Max didn't envisage mutiple copies in the special fields. Here's a fix to try (not tested). At line 448 in chronocontact.php (in the latest version) replace this code
if ( trim($paramsvalues->ccfield) != "" ) {
  $ccemails[]   = $_POST[$paramsvalues->ccemails];
}
with this
if ( trim($paramsvalues->ccfield) != "" && trim($_POST[$paramsvalues->ccfield] != "" ) ) {
  $sp_ccemails  = str_replace(" ", "", $_POST[$paramsvalues->ccfield]);
  $sp_ccemails  = explode(",", $sp_ccemails);
  if ( !$ccemails ) {
    $ccemails = array();
  }
  $ccemails   = array_merge($ccemails, $sp_ccemails);
}
This isn't too elegant but it keeps the hack in one place. Should then work for a comma separated list of addresses. You can do the same for the bcc special fields if you need multiple values there.

Bob
This topic is locked and no more replies can be posted.