Survey Form - Build a Survey Form

Tell us what’s happening:

I’ve written my code and it’s come up with a load of things I supposedly haven’t done. Although the console shows my survey-form is working as expected. I spent ages going through checking I’ve included everything from the list of instructions, but it says I’m missing pretty much every instruction… That can’t be right… So I pasted it into my VS and checked the webpage = it works perfectly and there are no errors. So happy.
But I want to pass the freecodecamp section, but I’m not sure how to make all those errors go away when they don’t seem to be there. Thank you in advance

Your code so far

<!DOCTYPE html>
<html lang="en">
</lang>
<Head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="styles.css">
</head>

<Body>
    <h1 id="title">
      Apply here to start coding!    </h1>
    <main>
        <p id="description"> Get started with your journey by filling in this short survey below</p>
        <form id="survey-form">
            <fieldset for="name">
                <label id="name-label" for="name">Name:<input required type="text" id="name"
                        placeholder="Enter your name"></label>
                <label id="email-label" for="email" >Email:<input required type="email" id="email"
                        placeholder="Enter your email"></label>
                <label id="number-label" for="number" >Age (optional):<input type="number" minlength="10" maxlength="99"
                        id="number" pattern="[0-9]" placeholder="Enter your age">
                </label>
                <label for="gender">Gender
                    <select id="gender" name="gender">
                        <option value="1">Select</option>
                        <option value="2" name="male">Male</option>
                        <option value="3" name="female">Female</option>
                        <option value="4" name="other">Other</option>
                </label></select>
            </fieldset>
            <fieldset for="dropdown">
                <label for="dropdown"> What role are you looking for?
                    <select id="dropdown" name="role">
                        <option value="1" name="Select-One">Select one</option>
                        <option value="2" name="Web">Web Developer</option>
                        <option value="3" name="Data">Data Analyst</option>
                        <option value="4" name="Front">Front End</option>
                        <option value="5" name="Full">Full Stack</option>
                        <option value="6" name="Not-sure">Not sure yet</option>
                    </select> </label>
            </fieldset>
            <fieldset>
                <p> What do you like about coding? (check all that apply)</p>
                <label for="likes" name="likes"><input id="likes" type="checkbox" />I like to challenge myself</label>
                <label for="likes"><input id="likes" type="checkbox" />I like to learn new things every day</label>
                <label for="likes"><input id="likes" type="checkbox" />I like to collaborate with others</label>
                <label for="likes"><input id="likes" type="checkbox" />I like the sound of remote working</label>
                <label for="likes"><input id="likes" type="checkbox" />The average salary for the above roles are
                    appealing</label>
                <label for="likes"><input id="likes" type="checkbox" />All of the above</label>
            </fieldset>
            <fieldset>
                <legend>Are you ready to get started? (required)</legend>
                <label id="definately"> <input id="definately" type="radio" name="definately" checked />
                    Definately</label>
                <label><input type="radio" name="Not yet" /> Not Yet</label>
                <label><input type="radio" name="Maybe" /> Maybe</label>
            </fieldset>
            <label for="tell" id="tell">Tell us more:<textarea id="tell-us" rows="5" cols="60"
                    placeholder="I'm interested in coding because..."></textarea></label>
            <input id="submit" type="Submit" value="Sign up" 
        </form>
    </main>
</Body>

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

Survey Form - Build a Survey Form

I’m not sure if my code has pasted into the post above properly…

Welcome to our community!

You have duplicated ids which is not allowed in html (id must be unique) and lots of different mistakes such as unclosed tags etc. Use https://validator.w3.org to check your code out yourself.

1 Like

Thank you for suggesting that website to check my code. I successfully completed the section :smile: I didn’t actually think anyone would be able to help with such a large amount of code to check through, thanks for your help!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.