What a great module! It saved me tons of custom code.

If you create an email field and set the number of values to more than 1 (in my case I set it to unlimited), then set the display to a contact form, the resulting contact form(s) all go to a single contact form that sends the email to the first value.

In my case I wanted the contact form to send the email to all the email addresses. To do that I changed line 394 in the email.module file to use all the email addresses, separated by commas. Note that this code is hardwired for a specific field definition I created and I'm sure it's not the most elegant code...

  $email_array = array();
  foreach ($node->field_my_email_contact as $one_email) {array_push($email_array, $one_email['email']);}
  $email = implode(', ', $email_array); 

It might be nice to come up with a generic option that is a selectable option.

Comments

gnindl’s picture

Version: 6.x-1.2 » 6.x-1.4
Status: Active » Needs review
StatusFileSize
new914 bytes

Made a patch and added some conditions, please test.

greggmarshall’s picture

Sadly, I am no longer involved in the site that had this need, so my ability to test the patch is severely limited.