On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Long story short, i need to parse the email fields in a form and based on user input, validate and send them.

    I’m building a "wishlist" email form where the intended recipients are those that are filled out in the "senders form" or form that the customer is filling out.

    Somehow I need to pass in the email addresses AFTER the form has submitted.

    Right now, instead of replacing these fields with real email addresses, it tries to send them to [+requestEmail2+], [+requestEmail3+], etc...

    How do I make it so it parses those variable holders so it actually sends to a real email address?

    &subject=`Your friend sent you their wishlist!`

    tpl or "WISHLIST_sendersform" template: (Not the whole thing, just the pertinent part)

    <td><span class=’t10’><b>Name</b></span></td><td><span class=’t10’><b>Email</b></span></td>
    <td><input type="text" name="requestName1" class="input" value=""></td>
    <td><input type="text" name="requestEmail1" class="input" value="" size="35"></td>
    <td><input type="text" name="requestName2" class="input" value=""></td>
    <td><input type="text" name="requestEmail2" class="input" value="" size="35"></td>
    <td><input type="text" name="requestName3" class="input" value=""></td>
    <td><input type="text" name="requestEmail3" class="input" value="" size="35"></td>
    <td><input type="text" name="requestName4" class="input" value=""></td>
    <td><input type="text" name="requestEmail4" class="input" value="" size="35"></td>
    <td><input type="text" name="requestName5" class="input" value=""></td>
    <td><input type="text" name="requestEmail5" class="input" value="" size="35"></td>