I created a simple form on my HTML website. Is this the correct way to send user's inputted email address to my inbox? Thanks in advance for your help.
HTML code:
<div class="waitlist">
<form action="MailThis.to/[email protected]" method="post">
<input type="text" name="user_email" placeholder="Enter Email" class="field" required>
<button>Join Waitlist</button>
</form>
</div>
CodePudding user response:
I think you should use enctype=”multipart/form-data” in form tag. And essentially, your button tag need attr: type="submit".
CodePudding user response:
You need to have a submit button, otherwise, that button is completely meaningless to the computer. There is also an email input type.
<div class="waitlist">
<form action="MailThis.to/[email protected]" method="POST" encType="multipart/form-data">
<input type="email" name="email" placeholder="[email protected]">
<input type="submit" name="submit" value="Join the waitlist" class="btn btn-primary">
</form>
</div>