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?

1 Answer 1

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


  • Thanks, I saw this...but doesn't this get pulled from the server side? {{ '[email protected]'|hash }} will this work if i just have a text input field then? Commented Oct 20, 2017 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? Commented Oct 20, 2017 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 Commented Oct 20, 2017 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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