Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

contact form main

@dimitrisdr

Desktop design screenshot for the Contact form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

It was my first time that I have tried to put aria-values that much. I think that i am starting to understand how this works.

What challenges did you encounter, and how did you overcome them?

I am not sure that the code for evaluating validation of each input is the best. Also, I am not sure if the e.preventDefault() prevents the form from being rendered to the server or it is just prevents the page from reloading.

What specific areas of your project would you like help with?

I would like to understand better the aria-attributes. More over I would like to understand better the functionality of the command e.preventDefault().

Community feedback

P
Samuel Adu 1,010

@samuel-adu

Posted

event.preventDefault() 

event.preventDefault() is a method in JavaScript that prevents the default action associated with an event from occurring.

The default action when a form is submitted is for the browser to send the form data to the server and reload the page, to prevent the page from reloading we use the event.preventDefault() method.

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord