Unclear Instructions in Curriculum Design? Steps 42/43 of the Registration Form Tutorial

Instruction is “Give each submittable element a unique name attribute of your choosing, except for the two radio inputs.”

I interpreted that as not giving the radio inputs any name attribute, thinking that would be addressed in a next step. Furthermore after submitting the code without any name assigned to the radio inputs, it not only accepted that as a pass, it quietly completed the page with assigned names to the radio buttons.

The lesson should include some type of rewording, such as a clarifying sentence: “For the two radio inputs, assign them the same name.” Furthermore, it shouldn’t pass the code if absolutely no name is given to the two radio buttons.

I didn’t test the case of giving them different names.

Here is code that passes this step without the names for radio buttons.

  <label for="first-name">Enter Your First Name: <input id="first-name" type="text" name="firstName" required /></label>
  <label for="last-name">Enter Your Last Name: <input id="last-name" type="text" name="lastName" required /></label>
  <label for="email">Enter Your Email: <input id="email" type="email" name="emailAddress" required /></label>
  <label for="new-password">Create a New Password: <input id="new-password" type="password" name="newPassword" pattern="[a-z0-5]{8,}" required /></label>
  <legend>Account type (required)</legend>
  <label><input id="personal-account" type="radio" value="personal" checked /> Personal</label>
  <label><input id="business-account" type="radio" value="business" /> Business</label>
  <label for="profile-picture">Upload a profile picture: <input id="profile-picture" type="file" name="profilePicture"/></label>
  <label for="age">Input your age (years): <input id="age" type="number" name="age" min="13" max="120" /></label>
  <label for="referrer">How did you hear about us?
    <select id="referrer" name="referrer">
      <option value="">(select one)</option>
      <option value="1">freeCodeCamp News</option>
      <option value="2">freeCodeCamp YouTube Channel</option>
      <option value="3">freeCodeCamp Forum</option>
      <option value="4">Other</option>
  <label for="bio">Provide a bio:
    <textarea id="bio" name="bio" rows="3" cols="30" placeholder="I like coding on the beach..."></textarea>
<label for="terms-and-conditions">
  <input id="terms-and-conditions" type="checkbox" name="termsAccepted" required /> I accept the <a href="https://www.freecodecamp.org/news/terms-of-service/">terms and conditions</a>

Hello there,

This is correct in that you should not touch the radio inputs. Are the instructions clearer with the following?

Except for the two radio inputs, give each submittable element a unique name attribute of your choosing.

This is incorrect, because it was addressed in a previous step:

The tests do not check you remove the name attributes from the radio inputs, because the radio inputs should not be touched for this lesson.

Hope this clarifies

1 Like

I suppose I forgot about that and just got confused. I think the following would be more clear:

Except for the two radio inputs (which you have already named), give each submittable element a unique name attribute of your choosing.

Also, there’s still the issue that if one removes the name from the radio buttons, it still passes. I don’t know if this is an issue or a side-effect of the design.

We could definitely add a test for this. However, it becomes unproductive (see impossible) to write test cases testing negatives for actions Campers could take.

What I mean by that is, we could also write a test you do not write the word “hippopotamus” in the code anywhere, because the instructions do not ask you to. Whilst facetious, we do prefer to be more lenient on the tests passing, rather than causing potentially correct solutions to not pass, or confusion.

So, I think we are better going with the change you suggested to the instructions wording.

Do I need to submit a github issue for this? (Not sure if I know how.)

A PR was merged in to resolve this issue here

But in the future, if you are interested in opening an issue, you can do so here

First check to make sure that the issue you looking to create doesn’t exist yet. If not, then create an issue

You can also look at existing issues to better understand how to word it.
Then a member of the team will get back to you

hope that helps

1 Like