Html Required Tag Doesn't Work For Form Submission
Solution 1:
I think your problem is that you already add a value inside the textbox. Meaning there is already something in it. It thinks its filled.
If you empty the field and click the button a warning will pop-up saying that field is required.
Remove the value=
from your form and try again.
You can also add text in front of the input fields like this:
To: <input type="text" id="to" class="cleardefault to" name="to" size="8px" required /><br />
with the same effect. But with working required fields.
Solution 2:
Remove the content of the value attribute of<input required type="text" id="from" class="cleardefault from" name="from" **value=""** size="8px"/>
.If you need to put a value in that text box,you can put placeholder
ie <input required type="text" id="from" class="cleardefault from" name="from" placeholder="From" size="8px"/>
Post a Comment for "Html Required Tag Doesn't Work For Form Submission"