Properly Populate An Email Using Only HTML
For an assignment, I need to put a form in my webpage, and have the form populate an email for the user to send. I wrote up this after searching around:
Solution 2:
mailto forms will always adds all the fields to mail body. javascript can do trick for you. are you allowed to use Javascript ..?
May be this will work for you
<html>
<form onsubmit="window.location='mailto:me@domain.com?subject='+myform.subject.value + '&body='+myform.comments.value" name="myform" method="post">
<input name="subject" value="Commencement Form" />
<input name="comments" value="my body" />
<input type="submit" value="submit">
</from>
</html>
Post a Comment for "Properly Populate An Email Using Only HTML"