How to make someone unable to open the webpage if he doesn't fill the forms? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make someone unable to open the webpage if he doesn't fill the forms?

When I click on submit button without filling the form, the webpage opens that i have set in action attribute. But I don't want anyone to do so. What should I do plz help.

27th Dec 2018, 9:03 AM
Dheeraj
Dheeraj - avatar
2 Answers
+ 4
Example <form autocomplete="off"> <label for="e-mail">Your e-mail address: </label> <input name="Email" type="text" required /> <input type="submit" value="Submit"/> </form>
27th Dec 2018, 9:09 AM
Dheeraj Tiwari
Dheeraj Tiwari - avatar
+ 4
Use the required attribute like this https://www.sololearn.com/learn/HTML/2216/
27th Dec 2018, 9:08 AM
Dheeraj Tiwari
Dheeraj Tiwari - avatar