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?

<input type="input" name="toEmail" value="">


  • 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? Oct 20 '17 at 10:44
  • 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? Oct 20 '17 at 10:50
  • 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 Oct 20 '17 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.