Build a Survey Form Submit Button Not working

Build a Survey Form Submit Button Not working
0

#1

Tell us what’s happening:
I am at the final (#16) user story but keep getting this message!
16. 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.
my initial try:

Your code so far

relevant bit:

          <div>
            <button id="submit" type="submit">Submit</button>
          </div>
      </form>

**Your browser information:**

User Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:61.0) Gecko/20100101 Firefox/61.0</code>.

#2

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#3

Ok great, Thank you!


#4

Can you post a link to your full project, so we can take a look at how everything is labelled?


#5

Sure! It’s pretty sloppy because I just wanted to make sure I could get it to pass the tests.


#6

You need to properly indent your html, so you can easily spot issues.

Anyway, you will notice in general you do not see the Submit button displayed on the page anywhere. However, if you expand the textarea input on the page, you will see:

</label>
      </div>

      <button id="submit" type="submit">Submit</button>
    </form>
  </body>
</main>

</html>

</body></html>

inside it. Why? Because textarea elements have an opening and a closing tag and you are missing one of them.


#7

Other things I want to let you know about:

  1. There is no such thing as a type attribute for textarea elements, so you can delete type=“text”

  2. You are referencing the id=“Maybe” more than once in your html (once in the radio buttons and again in the checkboxes). Ids are supposed to be unique to the page.


#8

Thank you so much for your help; I’ll take your comments on board!