1

So, I'm currently studying an HTML course on udemy and there's a part in the video where the instructor creates a "mailto" attribute and when she clicks the "submit" button, it opens her mail client. I followed everything to the teeth and even checked on the mdn website but nothing opens when I click "submit" on my end.

This is a test form that I created, please check below!

<form action="mailto:info@gmail.com" method="post" enctype="text/plain">
        <label>Name</label>
        <input type="text" name="yourName" value="">
        <br>
        <label>Email</label>
        <input type="email" name="yourEmail" value="">
        <br>
        <label>Preferred contact date:
          <input type="date" name="yourContactDate" value="">
        </label>
        <br>
        <label>Your feedback</label><br>
        <textarea name="yourFeedback" rows="10" cols="10"></textarea><br>
        <input type="submit" name="">
        <br>
        <label>Rate your experience!</label>
        <input type="range" name="" value="" min="0" max="100">
      </form>
Rob Moll
  • 3,345
  • 2
  • 9
  • 15
Apache
  • 11
  • 3

2 Answers2

0

I tried your code and it does work on my browser.

However, after doing some research, I found that some browsers will not open mailto forms if you use post.

Drivers Sea
  • 446
  • 2
  • 10
  • Ah, it could be that I'm using Google Chrome beta? I opened the index.html file in Microsoft Edge, and it did open google.com when I clicked submit, even with post in the method attribute, thanks! – Apache Oct 21 '21 at 00:34
0

your formular is flawless in my opinion.

I you dont have a very special Browser, check your default application for emails in your operating system. Make sure you use something recommended like Outlook or Firefox to handle the mail:to form.

Otherwise you should take a look over here, in that case, that it might be caused by your browser:

Mailto links do nothing in Chrome but work in Firefox?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Lord Gulasch
  • 106
  • 2