<pre><code>&lt;input type="input" name="toEmail" value=""&gt;
</code></pre>

<p><a href="https://github.com/craftcms/contact-form/tree/v1#dynamically-adding-email-recipients-requires-craft-25" rel="nofollow noreferrer">https://github.com/craftcms/contact-form/tree/v1#dynamically-adding-email-recipients-requires-craft-25</a></p>

CC BY-SA 3.0
2017-10-20T10:44:23.320Z
Thanks, I saw this...but doesn't this get pulled from the server side?
{{ 'me@example.com'|hash }}
will this work if i just have a text input field then?
ToddPadwick
CC BY-SA 3.0
2017-10-20T10:50:56.890Z
I also need to populate the from email with the same email otherwise  the user has to fill it in twice. would this have to be done using js?
ToddPadwick
CC BY-SA 3.0
2017-10-20T11:39:00.563Z
You have the `<input id="fromEmail" type="email" name="fromEmail" value="">` field as well.. you can include javascript that equals them. For the twig part: this is rendered as soon as the user opens the page -> before the user makes any input. You just need to try if it needs a hash or if you have to include it manually in the plugins "sendMail" function
Robin Schambach
CC BY-SA 3.0
2017-10-20T10:30:36.350Z
2017-10-20T10:30:36.350Z
Robin Schambach
<p>using the contactForm plugin, I want to make a contact form, that sends to an email address of the users choosing, not the email set up in the admin.
Does anyone know the simplest way of doing this?</p>

<form><plugin-contactform>
Send to a friend that sends an email to a defined email of the users choosing
# Send to a friend that sends an email to a defined email of the users choosing

(Asked by: username_0 on 2017-10-20)

using the contactForm plugin, I want to make a contact form, that sends to an email address of the users choosing, not the email set up in the admin.
Does anyone know the simplest way of doing this?

**Tags:** form, plugin-contactform

---

## 1 answers

### Answer by username_1 on 2017-10-20. Score: 1

https://github.com/craftcms/contact-form/tree/v1#dynamically-adding-email-recipients-requires-craft-25

> **Comments:**
> **username_0**: Thanks, I saw this...but doesn't this get pulled from the server side? {{ 'me@example.com'|hash }} will this work if i just have a text input field then?  
> **username_0**: I also need to populate the from email with the same email otherwise  the user has to fill it in twice. would this have to be done using js?  
> **username_1**: You have the `<input id="fromEmail" type="email" name="fromEmail" value="">` field as well.. you can include javascript that equals them. For the twig part: this is rendered as soon as the user opens the page -> before the user makes any input. You just need to try if it needs a hash or if you have to include it manually in the plugins "sendMail" function  

---

