I've attempted to setup several of the suggested snippets from the forums, but have not been able to get any of them working.
Can someone help me get this working? I have a client waiting for this. I can pay for your time.
I think you're missing
<select name="addressTo" value="[[!+fi.addressTo]]">
(In addition to Jako's suggestion)
I've just setup a dummy page to test it myself and it works fine using the code below:
[[!FormIt?
&hooks=`email`
&emailTpl=`contact-sendto`
&emailTo=`[[+addressTo]]`
]]
<p>[[!+fi.error_message:notempty=`[[!+fi.error_message]]`]]</p>
<form class="form" action="[[~[[*id]]]]" method="post">
<input id="email" type="text" name="email" placeholder="Email" value="[[!+fi.email]]" />
<select name="addressTo">
<option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>Ymail</option>
<option value="[email protected]" [[!+fi.addressTo:FormItIsSelected=`[email protected]`]]>Gmail</option>
</select>
<textarea id="text" name="text" rows="7" cols="45">[[!+fi.text]]</textarea>
<input type="submit" value="Submit" />
</form>
Test it yourself first as it is above (but with your emails) and then build outwards to how you want it.
Progress. This works on my own test site, but when I copy it to my client site the form does not send.
I don't think it's an issue with the dynamic address, because if I replace the placeholder in the emailTo field with my email address the form still doesn't send.
So there's something about this site setup that's getting in the way. What's weird is other forms on this site work just fine. Digging in. At least now I have a direction to go.
Thank you!