Hello. Please help me. My code doesn’t pass because the right and bottom developer consoles both have some comments and complaints about the code: Sorry, your code does not pass. Hang in there.
You should not modify your label element.
// running tests
You should not modify your label element.
You should add an input element on a new line.
// tests completed
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function addEntry() {
const targetInputContainer = document.querySelector(`#${entryDropdown.value} .input-container`);
const entryNumber = targetInputContainer.querySelectorAll('input[type="text"]').length + 1;
const HTMLString = ` <label for="${entryDropdown.value}-${entryNumber}-name">Entry ${entryNumber} Name</label> <input type="text" placeholder="Name" id="${entryDropdown.value}-${entryNumber}-name"> `;
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 49
After your label element, and on a new line in your template string, create an input element. Give it a type attribute set to text, a placeholder attribute set to Name, and an id attribute that matches the for attribute of your label element.
Thank you for your feedback. I appreciate your point of view and I agree that I should focus more on interacting with my colleagues and clients in my work. I will work on improving my communication skills and paying more attention to the feedback of others so that my responses are more useful and relevant. Thank you for the guidance! Sincerely, Dennis-code153