Drupal 6: Send customized emails to multiple addresses from fields within multiple field groups

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
mjstone323's picture

I have a multi-step form that is a job application.

On one step the applicant enters information for professional references, and on another, character references. They may add multiple references (field groups) on each page. The field groups for both types of reference include an email field, and a hidden "email sent" field.

At the end of the form, when the applicant submits the form, I wish to send customized emails to each of the references, and populate the "email sent" field with "yes".

To test this, I completed a dummy job application with one professional reference and one character reference.

I created triggered actions using the Rules and Token modules to accomplish the desired tasks for both types of references, for newly-published and updated content.

I was successful at sending one email to one address in the email field of the professional reference, and populate one hidden field with "yes" (again, in the professional reference), but neither of these things happened for the character reference.

When I added a second professional reference, no emails were sent and no hidden fields were populated.

In my investigation I found this forum entry: http://drupal.org/node/156860#comment-4002194 which refers to Itangalo's "Token Array", but this only generates tokens for 'multiple entry fields', not for field groups.

I really must make this work. Can anyone help? Please let me know if I should post this elsewhere.

Comments

Okay, so I'm wondering... I

mjstone323's picture

Okay, so I'm wondering... I have a display page for each teacher app where I'm able to grab and display the data from the fields in each fieldset. Is there some way I can use a PHP script to grab the same data and use it in an action? I'll keep thinking about it but would really appreciate the advice of someone with more expertise.

custom tokens?

mjstone323's picture

Tomorrow I'll try my hand at writing custom tokens for fieldgroups... although it seems like maybe somebody would already have done this?

Tokens

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: