Just like the subject line says. In a webform with an email component, under the options for From Name and From Email, the choices are the reverse of what they should be. I've attached a patch to fix this. The offending block is at line 588:

  if (is_array($node->webformcomponents) && !empty ($node->webformcomponents)) {
    foreach ($node->webformcomponents as $cid => $component) {
      $type = $component['type'];
/* This is wrong -- the first one should be email */
      if (in_array($type, array('textfield', 'hidden', 'select'))) {
        $possible_email_from_address[$component['name']] = $component['name'];
      }
/* This is wrong -- the first one should be textfield */
      if (in_array($type, array('email', 'hidden', 'select'))) {
        $possible_email_from_name[$component['name']] = $component['name'];
        $possible_email_subject[$component['name']] = $component['name'];
      }
    }
  }
CommentFileSizeAuthor
webform_19.patch870 byteschellman

Comments

davemybes’s picture

Just noticed the same issue, and that's exactly the patch I did to the module. Good job on this patch.

quicksketch’s picture

Status: Needs review » Fixed

Thanks, this issue has been corrected in 5.x already. I've applied your patch, but 4.7 is no longer being supported and no new releases of webform will be created for 4.7. I'd highly suggest getting your sites onto 5.x if possible. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)