We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32507
    • 142 Posts
    Hi,

    I have hidden input field in my FormIt contact form, which gets its value through custom Snippet - email(s) in this case.

    '&emailTo' property get the value from this field.

    <input type="hidden" name="sales_contact" value="[[!+fi.contact]]">


    FormIt call:
    [[!FormIt?
    	&emailTo=`[[+sales_contact]]`
    ]]


    If snippet returns comma separated value I get error "[FormIt] Please specify a recipient or recipients for the email."
    The result is same even if i hardcode the comma separated value to hidden field.

    If Hidden input Field with value:
    <input type="hidden" name="sales_contact" value="[email protected]">
    WORKS

    If Hidden input Field with comma separated value:
    <input type="hidden" name="sales_contact" value="[email protected],[email protected]">
    ERROR

    What i'm doing wrong? '&emailTo' should take comma separated values.
      • 3749
      • 24,544 Posts
      I don't see why that doesn't work. It may not meet your needs, but IIRC, SPForm will do multiple recipients (or specify a CC) and let you pick one from a drop-down list -- more importantly it will do it without exposing the email addresses in the source of the page to be harvested by bots.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting