I’d be glad to help! Let me start by saying that this problem had me confused for weeks. There me be a more elegant way to pull it off (like being able to place the form on the same page as the contact directory), but this way definitely works.
In addition to eForm, WebLoginPE and a little JQuery, the real magic here was handled by two snippets: eform2session and Session2Placeholders. They aren’t well-documented in the "Extras" section, but here’s a forum thread about them that will help:
http://modxcms.com/forums/index.php/topic,15350.0.html
Once you’ve read up on and installed those snippets, here’s my solution:
1. Create two pages: one for the member directory, and one for the form.
2. On the member directory page, call the eform2session snippet first, then eForm immediately after. Mine looks like this:
[[eForm2session]]
[!eForm? &eFormOnBeforeMailSent=`eForm2session` &formid=`memberdirectoryFormTpl` &noemail=`1` &tpl=`memberdirectoryFormTpl` &gotoid=`50` &protectSubmit=`0`!]
This is all pretty straightforward if you’ve worked with the OnBeforeMailSent parameter before. Something to note: "noemail" obviously prevents eForm from sending an email, and "gotoid=`50` points to the second page you created in step 1 that contains the form (in my case, it has an ID of 50).
3. Time to create the form Tpl. Mine looks like this:
[+validationmessage+]
<form method="post" action="[~[*id*]~]">
<fieldset>
<input type="hidden" name="formid" value="memberdirectoryFormTpl" />
<div class="sendemail_container">
<p>To take full advantage of the KanSPRA Member Directory, follow these instructions:</p>
<ol>
<li>To filter the list, type a keyword in the "Filter" input box (i.e., "northeast, "Blue Valley," "communications director").</li>
<li>To sort the list, click a column heading (i.e., "Name," "Region"). Shift-click a second heading to sort a second category.</li>
<li>To copy your sorted, filtered list to your clipboard, or to export it as a CSV or Excel file, click the appropriate icon on the right.</li>
<li>To send an e-mail, place a checkmark next to individuals' names you want to message and click "Send E-mail."</li>
</ol>
<input type="submit" name="submit" value="Send E-mail (note: you must select e-mail recipients below first)">
</div>
<table id="tablesorter" class="tablesorter" border="0" cellspacing="1">
<thead>
<tr>
<th><input type="checkbox" name="checkall" id="checkall" value="checkall"></th>
<th>Name</th>
<th nowrap>District/Organization</th>
<th nowrap>Phone</th>
<th>E-mail</th>
<th>Region</th>
</tr>
</thead>
<tbody>
[[WebLoginPE? &type=`users` &usersList=`All Users:kanspra_usersNewOuterTpl:kanspra_usersNewTpl:fullname:ASC:`]]
</tbody>
</table>
<input type="hidden" id="emailvalue" name="emailvalue" eform="Hidden Field:string:1::" />
</fieldset>
</form>
There are some important IDs in that form that make the checkboxes work with the JQuery plugins (for example, the last input in the form is a hidden field that is populated by JQuery with whatever names are checked).
4. You probably noticed the WebLoginPE call. This is what actually generates the list of active users and lays them out in the nice table (the table styling, sorting, filtering and Excel output are all handled by awesome JQuery plugins called DataTables and TableTools -- check out my header files to see how I got those working properly). The "userslist" parameter was a new one for me and took some time to figure out. I can try to explain it further if it doesn’t make sense; just let me know.
5. After the user selects the names he wants, eForm should add those e-mail address to session variables and send the user to the other page that you made in step 1. On this page, place this chunk of code:
[[SESSION2Placeholders?]]
<div class="emailsendlist"><strong>This message will be sent to:</strong> [+emailvalue+]</div>
[!eForm? &formid=`memberdirectory_sendform` &to=`[+emailvalue+]` &tpl=`memberdirectory_sendform` &report=`memberdirectory_sendreport` &gotoid=`51` &vericode=`1` &subject=`Message from the KanSPRA Web Site`!]</p>
Note that you can now use the "emailvalue" placeholder that was set on the previous page. The "gotoid" in this case is just a thank-you page, nothing special. There’s also nothing strange about the form Tpl, but if you want to see it, here it is:
[+validationmessage+]
<form id="kanspracontactform" method="post" action="[~[*id*]~]" enctype="multipart/form-data">
<input type="hidden" name="formid" value="memberdirectory_sendform" />
<p><label accesskey="n" for="name">Your Full Name:</label>
<input type="text" name="name" maxlength="60" eform="Your Name::1:Expected at least two words:#REGEX /^\w+\s\w+/i" /></p>
<p><label accesskey="e" for="email">Your E-mail Address:</label>
<input type="text" name="email" size="40" maxlength="40" eform="Your Email Address:email:1" /></p>
<p><label accesskey="c" for="comments">Your Message:</label>
<textarea cols="40" rows="10" name="comments" eform="Comments:html:1"></textarea></p>
<p><label accesskey="a" for="attachment">Attach File:</label>
<input type="file" name="attachment" accept="text/plain,application/msword,application/rtf,application/pdf,text/html,text/html,image/jpeg,audio/mpeg,video/quicktime" eform="Attachment:file:0" />
<p>
<img src="[+verimageurl+]" alt="verification code" border="1"/>
</p>
<p>
<label accesskey="c" for="vericode">Verification Code:</label>
<input type="text" name="vericode" size="20" />
</p>
<p><input type="submit" name="submit" value="Send Message"></p>
</form>
So...that’s everything! It’s a little complicated, but this does work. Let me know if you need me to clarify this! If anyone with more experience has a better way of doing this, I’d love to hear it!