I get this error when trying to fill the form from chrome in my website.
And this after I submit the form.
This doesn't happen in any other browser, what do I've to do to make the form secure.
I get this error when trying to fill the form from chrome in my website.
And this after I submit the form.
This doesn't happen in any other browser, what do I've to do to make the form secure.
Share Improve this question asked Feb 24, 2021 at 10:13 Aanshumaan ShrijaiAanshumaan Shrijai 1191 gold badge1 silver badge11 bronze badges 4- Is your page served via HTTPS or HTTP? And is the protocol used to submit the form data HTTPS or HTTP? If either of them are using HTTP protocol, then that's probably why. You should never send sensitive data over HTTP, as it's not encrypted and it's "visible to others" Is it possible that this is the problem? – OOPS Studio Commented Feb 24, 2021 at 10:16
- androidpolice.com/2020/08/17/… – kol Commented Feb 24, 2021 at 10:16
- After some testing it appears that the notice appears when submitting a form to a site with HTTP protocol from a site with HTTPS protocol. – Spectric Commented Apr 26, 2021 at 2:22
- The only workaround I have found till now is to replace the div element to a form element – Aanshumaan Shrijai Commented Jun 14, 2021 at 9:08
4 Answers
Reset to default 8I have fixed it by using SSL and replace form action http to https. Google work on more form security like website if it's not secure.
Hope this will resolve your problem.
with http
with https
My website is https
, but I got the same problem.
And I saw
in the
form
tag I wrote:<form action="http://mywebsite.com/sendMail.php">
my
endPoint
I wrote:
post = {
endPoint: 'http://mywebsite.com/sendMail.php',
}
No. They should all be https
.
I've changed them and now everything works fine.
You should do this:
In the form set onSubmit as:
onSubmit={handleSubmit}
Create a function to handle submit:
const handleClick = (e) => {
e.preventDefault();
window.open(`mailto:${email}?subject=${subject}&body=${name}: ${message}`);
}
3.Done!
I'm the author of the question.
The only workaround I have found to make it secure is to replace the div element with the form element, but that doesn't give us more control over it, so that's not the best solution, but you can replace the form element with the div element