Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

createElement, insertAdjacentElement, for loop

Marissa Huysentruyt•165
@marissahuysentruyt
A solution to the Intro component with sign-up form challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I'm not super happy with the functionality. I've been stuck on the validation.

  1. If a user misses a field, they get an error. However, if they correct that error, I can't get the newly created element to disappear. Any help there?
  2. Similar to my first question, I can't get the field border to change if the user fixes any errors. I can get the font color to change back correctly, but not the border.
  3. Because I'm using createElement to get my error Icons & error spans, when they get created, they're bumping the rest of the form fields. Initially I had them all just visibility: hidden, changing to visibility: visible. How do I avoid the content bump?
  4. Again, sort of going off the question above, if a user misses a field multiple times, the submit button keeps generating errors over and over again. How can I only allow errors to show up once?
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 Marissa Huysentruyt'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