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

Interactive Card Details Form with Validation

accessibility, animation, fetch, material-ui, vanilla-extract
Nelly•130
@NellyFE
A solution to the Interactive card details 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’m really proud that I was able to add real-time form validation and make the card details update as users typed. I also learned how to show a thank-you section that replaces the form when everything is filled out correctly.

Next time, I’d like to work on making my JavaScript code simpler and easier to read by breaking it into smaller, reusable functions.

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

I encountered challenges with dynamically resetting the form and clearing the displayed card details. To overcome this, I wrote a dedicated resetInputs function that efficiently cleared the input fields and reset the card display to its default state.

Another challenge was positioning text over images; I resolved this using CSS properties like position: absolute and z-index.

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

I’d love feedback on how to make the form more accessible for screen readers and tips to improve the CSS for a more responsive layout.

Also, any advice on making my JavaScript code simpler and more efficient would be really helpful!

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 Nelly'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