0

I am trying to get the contents of a form to send in an email. Below is the code but it does not add the text to the email.

<form method="post" action="mailto:emailaddress@co.uk.com">
  First name:<br>
  <input type="text" name="firstname" value="MR">
  <br>
  Last name:<br>
  <input type="text" name="lastname" value="Test">
  <br><br>
  <input type="submit" value="send email" />
</form> 

P S
  • 4,827
  • 4
  • 27
  • 50
Dexterwolf
  • 5
  • 1
  • 3

1 Answers1

0
<input  type="text" name="firstname" id="fstName"/>
<input  type="text" name="lastname" id="lstName"/>

to get value of those textbox use this:

FirstName= $("#fstName").val();
LastName= $("#lstName").val();
Melad Batta
  • 1,011
  • 1
  • 8
  • 17