Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-20T10:44:23.320Z
Answers.Text: 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?
Answers.UserDisplayName: ToddPadwick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-20T10:50:56.890Z
Answers.Text: 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?
Answers.UserDisplayName: ToddPadwick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-20T11:39:00.563Z
Answers.Text: 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
Answers.UserDisplayName: Robin Schambach
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-20T10:30:36.350Z
Answers.LastActivityDate: 2017-10-20T10:30:36.350Z
Answers.UserDisplayName: Robin Schambach
Body: <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>
  
Tags: <form><plugin-contactform>
Title: Send to a friend that sends an email to a defined email of the users choosing
ThreadText: # 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
  
  ```
  <input type="input" name="toEmail" value="">
  
  ```
  
  <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  
  
  ---
  
  