Thank you very much. I recently started learning JavaScript, this video is the first video in 4 consecutive ones that finally worked (for me at least) without problems that i didn't know how to solve.
Don't use the prevent submit function in the java script, instead run the function from the form, by adding onsubmit="return validateForm()", by that the form will be submitted if the function returns true
does anyone know how I would be able to transfer the information gathered from this form into MySQL using XAMPP? I've never used these programs before and I'm confused
if (document.querySelectorAll('.success').length === 4) { // submit the form form.submit(); } // You can submit the form if all the inputs are valid by adding a line of code after the validation checks inside the validateInputs function.
how to call the function with each of these variables as an argument emailaddress variable and emailconfirm variables Do you know how to make two of the same emails need to match and is that client side validation or server side? Inquiry of js on html form
Thanks for the feedback! It would be great to create a crash course, unfortunalely I don’t have time to create it now (this year), but it is definetely on my list now.
Thank you so much everything is working but i need a little help at the submit button i have to make a link to anther page after i fill all the boxes is it possible.
I’m planning to release a tutorial about it soon, you have some options in the form you can set the action which accepts a url and then you need to have a backend configured to handle the data from your form
Could you please help me to understand my mistake? I have the following code:
dokimastiko
and this is my js code let y = getElementById('onoma').value; and it gives me a reference error getelementbyid("onoma").value; is not defined. What am I doing wrong? Thank you.
the video has a lot to speak. But a little bit fast. I think it is designed for some one who has little experience on html, CSS, and java script. They need a detailed explanation and thoroughly follow-up.
For validation purpose this video is informative, but when in comes to submission 👎 the guy did not give a tutorial on how to submit the form, which is the main purpose of form validation. The guy just focus on ui/ux validation output. So if you're beginner this tutorial is no good, especially if you want to submit the form.
Don't use the prevent submit function in the java script, instead run the function from the form, by adding onsubmit="return validateForm()", by that the form will be submitted if the function returns true
Thank you very much. I recently started learning JavaScript, this video is the first video in 4 consecutive ones that finally worked (for me at least) without problems that i didn't know how to solve.
That’s really great to hear! I’m glad I could help 😉
Bro greatings from Egypt!
You are great you helped me really ❤
Simple and effective! That exactly what I needed
Very helpful video, for me this worked, nothing else was working
Thank you so much for this great tutorial! Saved me a lot!
This is so 👍 great Need more videos on javascript...
Thanks for the kind words Shanky!
A few more videos are in progress, in the meanwhile you can check my other videos on javascript 😉
Great video. Short, to the point, and well explained.
Very useful video and clear explanations, thank you for this tutorial 💗💗
Simple and understandable. Thanks
Thank you for this tutorial it helped me a lot😊
Great to hear that! 😊
HOW DO YOU clear the input field after successful submit??
Thanks for a great tutorial! How do you get the form to submit if it passes validation?
Basically, this method does not prevent the button from submitting a form even after the validation of all input controls.
Yes. Please do you know how to override the preventDefault if all requirements is reached? .
form.addEventListener('submit', (e) =>{
var flag = 1;
if(name.value === ''){setError(name, "Username is required"); flag=0;
}else{setSucces(name)}
if(email.value === ''){setError(email, "email is required"); flag=0;
}else{setSucces(email)}
if(password.value === ''){setError(password, "Password is required"); flag=0;
}else if(password.value.length < 8){setError(password, "Password must be atleast 8 charecter"); flag=0;
}else{setSucces(password)}
if(password2.value === ''){setError(password2, "Please confirm password"); flag=0;
}else if(password.value != password2.value){setError(password2, "Password should be same"); flag=0;
}else{setSucces(password2)}
if(flag === 0){ e.preventDefault(); }
})
The form will not submit until you add the submit functionality below the validateInputs(); function.
you mean the validateInputs(); bellow the submit functionality
How to solve this issue..
@@uhk2150 did you solve it please ?
Just put the 'defer' key word in the script tag that will solve the problem
@@mihrettekalgn9492 can you please explain to me where to put it specific
Brief and helpful, thanks!
Thanks for this video. So simplified
Great video bro,thank you very much
Cool! Thank you so much!
how does the script know when every input is validated and its time to stop preventing the default action of 'submit' ??
Don't use the prevent submit function in the java script, instead run the function from the form, by adding onsubmit="return validateForm()", by that the form will be submitted if the function returns true
@@chrischti works!! Thank you perfect
I found the solution. submit() is a method. It will just eleminate preventDefault and just submit the form.
Great job
Amazing video!
Thanks a lot!! This was very useful!!!
thank you so much for your great video
Wow
Thanks, man!
Thanks a lot, that was useful!
Thank you so much!!!!
Please can anyone help with making the form submit?
this will not prevent submitting the form if something is not valid...
thank you bro thumbs up
does anyone know how I would be able to transfer the information gathered from this form into MySQL using XAMPP? I've never used these programs before and I'm confused
event I need this! Did u find the solution?
Subscribed!
Hey, so how to stop preventDefault() from executing if the inputs are valid?
did you find a solution please .?
if (document.querySelectorAll('.success').length === 4) {
// submit the form
form.submit();
}
// You can submit the form if all the inputs are valid by adding a line of code after the validation checks inside the validateInputs function.
form.addEventListener('submit', (e) =>{
var flag = 1;
if(name.value === ''){setError(name, "Username is required"); flag=0;
}else{setSucces(name)}
if(email.value === ''){setError(email, "email is required"); flag=0;
}else{setSucces(email)}
if(password.value === ''){setError(password, "Password is required"); flag=0;
}else if(password.value.length < 8){setError(password, "Password must be atleast 8 charecter"); flag=0;
}else{setSucces(password)}
if(password2.value === ''){setError(password2, "Please confirm password"); flag=0;
}else if(password.value != password2.value){setError(password2, "Password should be same"); flag=0;
}else{setSucces(password2)}
if(flag === 0){ e.preventDefault(); }
})
very helpful turorial.
How do you write the exponential symbol?
how to call the function with each of these variables as an argument emailaddress variable and emailconfirm variables
Do you know how to make two of the same emails need to match and is that client side validation or server side? Inquiry of js on html form
Superb 🔥
need JavaScript Crash Course 🙏🏻😊
pls cover the JS Topic's required to Start with React or Angular 👍
Thanks for the feedback!
It would be great to create a crash course, unfortunalely I don’t have time to create it now (this year), but it is definetely on my list now.
We are waiting for it..
why have a validation form tutorial where the submit button doesnt work T.T
The form will not submit until you add the submit functionality below the validateInputs(); function.
@@realitystevens Okay, but what if your using php for the backend and want to actually submit for it to work, I guess its better to use something else
Thank you for this but my out put is not coming if i click the button it will show the c: drive can you pls suggest
Feel feee to check the source code in the description, there must be a typo in your code
Don't know if you found a solution yet, but in your HTML, your form tag, just delete everything else in there and use only id="id name"
Very well done. May I use the code in my project. I will add on to it.
Thank you so much.....
will this be saved ? i want to login with the signed id and password only
Would it be an issue if we use the same div class = "input-control" instead of creating multiple and just changing the id and name?
your website seems to be down - tried visiting and no joy. Great video
It should be up I’ve just tested it. Please try it like this: www.javascriptacademy.dev
Hi, there how can we do with onClick(); when button have clicked?
I know it's been 2 months but...
You just assign the attribute
Onclick = yourfunc()
@@bzoxx Thank! but what if we didn't fill the form already and then click on button.
it's work but the form not work (PHP) why?
would anyone know - whilst creating a SIGN UP FORM - how to get the submit button the same exact size at the input boxes?
Thank you so much everything is working but i need a little help at the submit button i have to make a link to anther page after i fill all the boxes is it possible.
You can use the action attribute of the form element or you can send an xmlhttprequest to any backend endpoint
Thank you
how do i remove e.preventDefault() after validation so it move to the next page... thank you
I’m planning to release a tutorial about it soon, you have some options in the form you can set the action which accepts a url and then you need to have a backend configured to handle the data from your form
Could you please help me to understand my mistake? I have the following code:
dokimastiko
and this is my js code
let y = getElementById('onoma').value;
and it gives me a reference error getelementbyid("onoma").value; is not defined.
What am I doing wrong? Thank you.
Correct is: let y = document.getElementById('onoma').value
It doesn't work when I submit with the button 👎
The codes are not working
css part was a bit blury at the end but good video
how can i go to other page if i click
what about when validating radio buttons and dropdown lists?
you don't need to worry about validating radio buttons ant select list. users can only select from the options you've predefined upon creating
can you make tutorial this form validation with firebase, it will be so helpful to others if make that :(
How did you space out the text boxes without using any margin settings
the spacing was added from the height of the .error div
@@fidelisitor8953 Thanks bro
why i cant submit the form??
how to redirect the next page
Nice
Thank you! 😊
thanks😀
INPUT OVERFLOW?
fix: * { box-sizing: border-box; }
Thnks😊
Where is source code?
the video has a lot to speak. But a little bit fast. I think it is designed for some one who has little experience on html, CSS, and java script. They need a detailed explanation and thoroughly follow-up.
Nice🥰
I am using javascript function to submit form data. So, how can call it only after validating inputs?
Yes we want to know ?
How to remove preventDefault after everything is validated? Form can't be submitted. Without that this tutorial is useless :)
New web development tutorial from me: Memory card game using Javascript, HTML, and CSS: 🔥
ua-cam.com/video/xWdkt6KSirw/v-deo.html
Lesson from udemy
querySelectro('.error)'; ....why the dot?
It mean that the error is a Html class
@@JsAcademyOfficial thanks mate.
All went well. Please what do I need to do if I want to add an icon on the error validation?
Hi, do u finally got this?? explain me pls!
For validation purpose this video is informative, but when in comes to submission 👎 the guy did not give a tutorial on how to submit the form, which is the main purpose of form validation. The guy just focus on ui/ux validation output. So if you're beginner this tutorial is no good, especially if you want to submit the form.
I'll release a tutorial soon where I'll show you how you can submit the form and process it on the server-side (nodejs). Stay tuned.
Godly
After validating and theres no error but the submit button not working anymore. how do i fix this
i want to know how too
Don't use the prevent submit function in the java script, instead run the function from the form, by adding onsubmit="return validateForm()", by that the form will be submitted if the function returns true
@@chrischti this not working
how to submit if validations are true....
i bet this fella is Hungarian
This whole this is very blurry did he had to assign the valuateInputs to a variable bacause just the name can be a the name. 😄
does not work
Rien compris
bro you go so fast pls slow down for the newbies here
not trying to be rude but this doesnt help me at all as a beginner
gj
😭😭
Русскоговорящий что ли?
нет, I'm hungarian :)
@@JsAcademyOfficial Madiyar?
Yes, magyar :)
@@JsAcademyOfficial I'm Kazakh. Kazah vagyok:)
That’s a nice place, welcome abroad!
This is not for beginners for sure 😅😂
For beginners my ass, i ve seen dozens of forms with js and this is not beginner level pffff BS
Total code copy and paste worest class