{"componentChunkName":"component---src-templates-blog-post-js","path":"/blog/freecodecamp/frontend/html/fcc-challenge-30-add-a-submit-button-to-a-form/","result":{"data":{"site":{"siteMetadata":{"title":"Be Brav3"}},"markdownRemark":{"id":"396e08c7-01bb-5d13-8fe8-e7da4490ffdc","excerpt":"In Free Code Camp Challenge 30 we’re adding a submit button to the submission form. Let’s add a submit button to your form. Clicking this button will send the…","html":"<p>In <a href=\"https://www.freecodecamp.com/challenges/add-a-submit-button-to-a-form\">Free Code Camp Challenge 30</a> we’re adding a submit button to the submission form.</p>\n<blockquote>\n<p>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.</p>\n<p>Here’s an example submit button:</p>\n</blockquote>\n<blockquote>\n<p>[html]</p>\n</blockquote>\n<blockquote>\n<p><button type=\"submit\">this button submits the form</button></p>\n</blockquote>\n<blockquote>\n<p>[/html]</p>\n</blockquote>\n<blockquote>\n<p>Add a submit button to your form element with type submit and “Submit” as its text.</p>\n</blockquote>\n<p>The original code is below:</p>\n<p>[html]</p>\n<link href=\"https://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">\n  \n<style>\n    \n.red-text {\n      \ncolor: red;\n    \n}\n<p>h2 {</p>\n<p>font-family: Lobster, Monospace;</p>\n<p>}</p>\n<p>p {</p>\n<p>font-size: 16px;</p>\n<p>font-family: Monospace;</p>\n<p>}</p>\n<p>.thick-green-border {</p>\n<p>border-color: green;</p>\n<p>border-width: 10px;</p>\n<p>border-style: solid;</p>\n<p>border-radius: 50%;</p>\n<p>}</p>\n<p>.smaller-image {</p>\n<p>width: 100px;</p>\n<p>}</p>\n</style>\n<h2 class=\"red-text\">CatPhotoApp</h2>\n<p>Click here for <a href=\"#\">cat photos</a>.</p>\n<p><a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a></p>\n<p>Things cats love:</p>\n  \n<ul>\n    \n<li>cat nip</li>\n    \n<li>laser pointers</li>\n    \n<li>lasagna</li>\n  \n</ul>\n  \n<p>Top 3 things cats hate:</p>\n  \n<ol>\n    \n<li>flea treatment</li>\n    \n<li>thunder</li>\n    \n<li>other cats</li>\n  \n</ol>\n  \n<form action=\"/submit-cat-photo\">\n    \n<input type=\"text\" placeholder=\"cat photo URL\">\n  \n</form>\n  \n[/html]\n<p>The updated code with submit button for the submission form is below:</p>\n<p>[html highlight=”48″]</p>\n<link href=\"https://fonts.googleapis.com/css?family=Lobster\" rel=\"stylesheet\" type=\"text/css\">\n  \n<style>\n    \n.red-text {\n      \ncolor: red;\n    \n}\n<p>h2 {</p>\n<p>font-family: Lobster, Monospace;</p>\n<p>}</p>\n<p>p {</p>\n<p>font-size: 16px;</p>\n<p>font-family: Monospace;</p>\n<p>}</p>\n<p>.thick-green-border {</p>\n<p>border-color: green;</p>\n<p>border-width: 10px;</p>\n<p>border-style: solid;</p>\n<p>border-radius: 50%;</p>\n<p>}</p>\n<p>.smaller-image {</p>\n<p>width: 100px;</p>\n<p>}</p>\n</style>\n<h2 class=\"red-text\">CatPhotoApp</h2>\n<p>Click here for <a href=\"#\">cat photos</a>.</p>\n<p><a href=\"#\"><img class=\"smaller-image thick-green-border\" alt=\"A cute orange cat lying on its back. \" src=\"https://bit.ly/fcc-relaxing-cat\"></a></p>\n<p>Things cats love:</p>\n  \n<ul>\n    \n<li>cat nip</li>\n    \n<li>laser pointers</li>\n    \n<li>lasagna</li>\n  \n</ul>\n  \n<p>Top 3 things cats hate:</p>\n  \n<ol>\n    \n<li>flea treatment</li>\n    \n<li>thunder</li>\n    \n<li>other cats</li>\n  \n</ol>\n  \n<form action=\"/submit-cat-photo\">\n    \n<input type=\"text\" placeholder=\"cat photo URL\">\n  \n<button type=\"submit\">Submit</button>\n  \n</form>\n  \n[/html]","frontmatter":{"title":"FCC Challenge 30: Add a Submit Button to a Form","date":"March 12, 2016","description":null}}},"pageContext":{"slug":"/blog/freecodecamp/frontend/html/fcc-challenge-30-add-a-submit-button-to-a-form/","previous":{"fields":{"slug":"/blog/freecodecamp/frontend/html/fcc-challenge-29-create-a-form-element/"},"frontmatter":{"title":"FCC Challenge 29: Create a Form Element"}},"next":{"fields":{"slug":"/blog/freecodecamp/frontend/html/fcc-challenge-31-use-html5-to-require-a-field/"},"frontmatter":{"title":"FCC Challenge 31: Use HTML5 to Require a Field"}}}}}