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? – ToddPadwick 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? – ToddPadwick Oct 20 '17 at 10:50
-
1You 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 Oct 20 '17 at 11:39