Submitted over 2 years ago
Intro component with sign up form using plain JavaScript
@hejkeikei
Design comparison
SolutionDesign
Solution retrospective
Any feedback would be appreciated:) For showing the error message, my approach is to have the element ready in HTML , then select the elements right after input fields to fill the content in the pre-existing elements:
inputfield.nextElementSibling.innerHTML = fields[i].getAttribute("placeholder") + " cannot be empty";
What do you guys think? I would love to see if there's a better way:)
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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