Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 7 months ago

contact-form-main

jquery
P
Joel Eguiza•440
@joeleg96
A solution to the Contact form challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


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

I am most proud of using the Chrome inspector tool to debug my Javascript, and looking up possible solutions online. I was able to learn how to do error states, and validation through the blur event preventDefault with submit.

I dont' think I would change anything for this project even though I found it extremely challenging and frustrating. The satisfaction of finally coming up with a solution at the end was worth it.

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

I had a plethora of challenges with this project. One of the biggest ones was figuring out how to check if the checkbox/radio buttons were checked. I had the logic but the syntax required for it to be (object)[0].checked = true and I wasn't including the bracket at first, so it wasn't working.

The other major problem that I had later on was figuring out how to ensure that one of the radio buttons were clicked, and the consent button was clicked in order to allow for the form to be successfully submitted. I had to look up a lot of possible solutions, and work through them. Most of them didn't work until I found .prop("checked"), which finally allowed for my code to verify that they were checked off.

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

I don't like that when my success message appears, it shifts the page down, so if anyone could provide me with some tips on how to avoid that I would greatly appreciate it. Thank you!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Joel Eguiza's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License