-1

I've created a contact form on a HTML website but not sure how I can make sure the form sends the queries only to my address.

<section id="contact-form">
  <form>
    <div class="contact-left">
      <h1 class="c-l-heading">
        <font style="border-bottom: 3px solid #FFC966;">Email</font> me</h1>
      <div class="f-name">
        <font>Name</font>
        <input type="text" placeholder="Full Name" />
      </div>
      <div class="f-email">
        <font>Email</font>
        <input type="email" placeholder="Example@gmail.com" />
      </div>
    </div>
    <div class="contact-right">
      <div class="message">
        <font>Message</font>
        <textarea name="message" rows="5" cols="20" placeholder="Write Message..."></textarea>
      </div>
      <button>submit</button>
    </div>
  </form>
</section>
mplungjan
  • 169,008
  • 28
  • 173
  • 236
  • 1
    That is fully up to the action of the form – mplungjan Nov 16 '20 at 10:40
  • 1
    Hi, you can’t send an email direct from JS, you need some backend code to actually do that and it could send only to you. This [link] https://stackoverflow.com/questions/7381150/how-to-send-an-email-from-javascript might help. – A Haworth Nov 16 '20 at 10:43

1 Answers1

0

Add form method and action:

  <form action="mailto:someone@example.com" method="post" enctype="text/plain"/>

submit must be like this:

  <input type="submit" value="submit"/>
Andrea Viviani
  • 217
  • 1
  • 6