26.9. Exercises: Forms¶
Hello programmer, we need you to make a Rocket Simulation form. Please follow the steps below and good luck!
26.9.1. Getting Started¶
Create a new HTML project in Visual Studio and begin creating your form.
26.9.2. Create your Form¶
Create a
<form>with these attributes.Set
methodto"POST"Set
actionto"https://handlers.education.launchcode.org/request-parrot"
Add a
<label>and<input>for Test Name to the<form>.<label>Test Name <input type="text" name="testName"/></label>.
Display Name |
Input Type |
Input Name |
Possible Values |
|---|---|---|---|
Test Name |
text |
|
No limitations |
Can you submit the form now? What is missing?
Add a
<button>Run Simulation</button>to the<form>.Enter a value into the “testName” input and submit the form.
Was the value properly submitted to the form handler?
Next add these five
inputsto the<form>.Pay attention to the types and possible options.
Also add a
<label>for each input.
Display Name |
Input Type |
Input Name |
Possible Values |
|---|---|---|---|
Test Date |
date |
|
Date format mm/dd/yyyy |
Rocket Type |
select |
|
Brant, Lynx, Orion, Terrier |
Number of Rocket Boosters |
number |
|
A positive number less than 10 |
Wind Rating |
radio |
|
No Wind: with value 0, Mild: with value 10, Strong: with value 20 |
Use production grade servers |
checkbox |
|
on or off |
Example
What the form will look like before submission.
Submitted Values
testName=Moon+Shot
testDate=2020-07-16
rocketType=Lynx
boosterCount=3
windRating=10
productionServers=on
