Conversation
Dm1trik
commented
Aug 22, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because the implementation violates task requirement #3 by selecting all inputs on the page instead of only those within the form. In src/scripts/main.js, the line that uses document.querySelectorAll('input') (please update the exact line number where this occurs) should be scoped to the form element as required. This is a critical blocker because it can include unintended inputs outside the form and fails an explicit requirement.
Issues to fix:
- Replace the global selector with a form-scoped one, e.g.,
document.querySelector('form').querySelectorAll('input')ordocument.querySelectorAll('form input').
Everything else (labels and placeholders) looks good—nice work there. Once the input selection is limited to the form, the solution should meet the requirements.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| 'use strict'; | ||
|
|
||
| // write code here | ||
| document.querySelectorAll('input').forEach((input) => { |
There was a problem hiding this comment.
This selects ALL inputs on the page, but requirement #3 specifies to get inputs FROM the form tag. Use document.querySelector('form').querySelectorAll('input') or document.querySelectorAll('form input') instead.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Here is my approval: You correctly scoped the selector to document.querySelectorAll('form input'), created labels with the field-label class, set each label’s for to match the input id, capitalized label text and placeholders based on each input’s name, and appended labels to the inputs’ parent containers. These steps fulfill the functional requirements and avoid the earlier global selector issue. The implementation appears clean and aligned with the task, with no critical blockers or missing features. As a minor improvement (non-blocking), consider guarding against inputs without an id or name to avoid edge cases, and handle cases where a label may already exist to prevent duplicates. Nicely done!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨