[[!Profile? &prefix=`usr.`]] [[!FormIt? &hooks=`emailSelector,email,redirect` &emailTpl=`board.email` &emailSubject=`Message` &emailTo=`[[+emailAddresses]]` &emailCC=`[[+usr.email]]` &emailBCC=`` &emailFrom=`[[+usr.email]]` &emailFromName=`[[+usr.fullname]]` &redirectTo=`72` &validate=`whom:required,text:required:stripTags` ]]
<p> <label>Choose whom to email: [[!+fi.error.whom]]</label> <input type="hidden" name="whom" value="" /> <input type="radio" name="whom" value="0" [[!+fi.whom:FormItIsChecked=`0`]] > First Person <input type="radio" name="whom" value="1" [[!+fi.whom:FormItIsChecked=`1`]] > Second Person <input type="radio" name="whom" value="2" [[!+fi.whom:FormItIsChecked=`2`]] > Both People </p>
<?php $group[0] = 't@barcom'; // First Person $group[1] = '[email protected]'; // Second Person $group[2] = '[email protected], [email protected]'; // Both People $userChoice = $hook->getValue('whom'); $choice = intval($userChoice); // convert string in integer $hook->setValue('emailAddresses',$group[$choice]); return true;
This question has been answered by TomMLS. See the first response.