Just finished my Survey Form, would love feedback :)

1 Like

Looks to be working good… I might change the size of the comments box at the end of the form in mobile view.

1 Like

Looks good Arronk.

Passed your code through the FCC tester: https://codepen.io/freeCodeCamp/full/MJjpwO

Unit tests
passes: 1 failures: 16 duration: 0.04s

Survey Form tests
#Technology Stack

  1. You can use HTML, JavaScript, and CSS to complete this project. Plain CSS is recommended because that is what the lessons have covered so far and you should get some practice with plain CSS. You can use Bootstrap or SASS if you choose. Additional technologies (just for example jQuery, React, Angular, or Vue) are not recommended for this project, and using them is at your own risk. Other projects will give you a chance to work with different technology stacks like React. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!
    #Content

  2. I can see a title with id=“title” in H1 sized text. AssertionError: There should be an element with id=“title” : expected null to not equal null

  3. I can see a short explanation with id=“description” in P sized text. AssertionError: There should be an element with id=“description” : expected null to not equal null

  4. I can see a with id=“survey-form”. AssertionError: There should be an element with id=“survey-form” : expected null to not equal null

  5. Inside the form element, I am required to enter my name in a field with id=“name”. AssertionError: There should be an input text field with id=“name” : expected null to not equal null

  6. Inside the form element, I am required to enter an email in a field with id=“email”. AssertionError: There should be an input text field with id=“email” : expected null to not equal null

  7. If I enter an email that is not formatted correctly, I will see an HTML5 validation error. TypeError: Cannot read property ‘type’ of null

  8. Inside the form, I can enter a number in a field with id=“number”. AssertionError: There should be an input text field with id=“number” : expected null to not equal null

  9. If I enter non-numbers in the number input, I will see an HTML5 validation error. TypeError: Cannot read property ‘type’ of null

  10. If I enter numbers outside the range of the number input, I will see an HTML5 validation error.’ TypeError: Cannot read property ‘min’ of null

  11. For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: id=“name-label”, id=“email-label”, and id=“number-label”. AssertionError: #name-label is not defined : expected null to not equal null

  12. For the name, email, and number input fields, I can see placeholder text that gives me a description or instructions for each field.’ TypeError: Cannot read property ‘hasAttribute’ of null

  13. Inside the form element, I can select an option from a dropdown that has corresponding id=“dropdown”.’ TypeError: Cannot read property ‘tagName’ of null

  14. Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the name attribute. AssertionError: There should be at least 2 radio buttons inside the #survey-form : expected 0 to be at least 2

  15. Inside the form element, I can select several fields from a series of checkboxes, each of which must have a value attribute. AssertionError: There should be at least 2 checkboxes inside the form : expected 0 to be at least 2

  16. Inside the form element, I am presented with a at the end for additional comments.’ AssertionError: The textarea is not inside the form element : expected 0 to be above 0

  17. Inside the form element, I am presented with a button with id=“submit” to submit all my inputs. AssertionError: There should be a button with id=“submit” : expected null to not equal null

Hope this helps

  • Garrett

Yeah, I don’t really follow the guidelines, just like to make the projects how I want for now, maybe I’ll go back and complete it following all the guidelines at a later date.

I understand that. I think what the guidelines are trying to do is create a solid foundation to prepare you as you develop more skills in the future. For example:

Having a “min” requirement on a number field. The form won’t be able to submit until that validation error is fixed.

Also having a “value” field in radio, checkbox, and dropdowns. That value is usually what is passed to and saved into a database once the form is processed using php, javascript etc.

Just my 2 cents.

  • Garrett
1 Like
  <label for="name"> Name:</label>
      <input type="text" id="name" name="name" placeholder="Full Name" required><br>
    
      <label for="number">Number:</label>
      <input type="number" id="number" name="number" min="11111111110" max="15000000000000" placeholder="Phone number" required><br>

i keep having an error as regards the #10 rule: User Story #10: For the name, email, and number input fields inside the form I can see corresponding labels that describe the purpose of each field with the following ids: id="name-label" , id="email-label" , and id="number-label" . the email and number are fine. its the name tag thats giving me a hard time, can you help?

1 Like