---
id: bad87fee1348bd9aedd08830
title: Add a Submit Button to a Form
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVMPUv/cp2Nkhz'
forumTopicId: 16627
dashedName: add-a-submit-button-to-a-form
---
# --description--
Let's add a `submit` button to your form. Clicking this button will send the data from your form to the URL you specified with your form's `action` attribute.
Here's an example submit button:
``
# --instructions--
Add a button as the last element of your `form` element with a type of `submit`, and "Submit" as its text.
# --hints--
Your form should have a button inside it.
```js
assert($('form').children('button').length > 0);
```
Your submit button should have the attribute `type` set to `submit`.
```js
assert($('button').attr('type') === 'submit');
```
Your submit button should only have the text `Submit`.
```js
assert(
$('button')
.text()
.match(/^\s*submit\s*$/gi)
);
```
Your `button` element should have a closing tag.
```js
assert(
code.match(/<\/button>/g) &&
code.match(/