+ 1
Required attribute is not working for me what should I do?
Guys the 'required' attribute is not working for me i a html form with JavaScript. But when I removed JavaScript it is work perfectly. What should I do for fix the issue. Here my code please check. ( https://code.sololearn.com/WDT5fau0EXpY/?ref=app. )
7 Answers
+ 1
It's still work. But had been hide by js.
Try this and you will see:
$(document).ready(function () {
$("#submit").on("click", function () {
//$("#form").fadeOut();
old = $("#wlcm").html();
$("#wlcm").html(old + "Hello " + $("#name").val() + "<br> Thanks for signing up!");
});
});
+ 1
Ya!! Thanks for help 👍
+ 1
I have a simple ex here, take alook!
https://code.sololearn.com/WSlV8163h2x0/?ref=app
0
You nees to code check and make sure all of require field funtion before hide the form and say thank you!
0
Thanks for your help but still some issues here I have updated my code with your JavaScript, after first click it show output 'hey ....Thank you..' and then go back to name input field
0
Yes, my modified script just don't hide the form so you can see it's still work. But don't really fix and finish the work for you.
0
To go futher in the code way you need learn how to do that your self!