As a user, when I go to this page, there should be a form to fill out information for a dino with “name”, “species”, ”age”, ”owner”, “imagelink” fields. And there is a button to create this dino.
AC
WHEN the user visits this page
THEN user should see form to fill out the information for a dino
AND there should be “name”, ”age”, ”owner”, “imagelink” text fields
AND and there should be “species” pre populated dropdown
AND and there should be a button to create this dino
When user clicks the button, the click event should capture the data after the validation and push it to the dinos array.
The click event should also assign the unique ID for each dino (look at Date.now())
The species dropdown should pre populate with following options ( T-Rex, Pterodactyl, Brachiosaurus, Stegosaurus, Triceratops, Velociraptor) and that should assign the type when the dino is created.
Create a createDino function, that captures the data from the form that assigns the appropriate data to a tempDino {} object and pushes in to the dinos array and then clears the form
Make sure to create the ids correctly (see Date.now() link above)
User Story
As a user, when I go to this page, there should be a form to fill out information for a dino with “name”, “species”, ”age”, ”owner”, “imagelink” fields. And there is a button to create this dino.
AC
WHEN the user visits this page THEN user should see form to fill out the information for a dino AND there should be “name”, ”age”, ”owner”, “imagelink” text fields AND and there should be “species” pre populated dropdown AND and there should be a button to create this dino
Dev Notes
createDino
function, that captures the data from the form that assigns the appropriate data to atempDino {}
object and pushes in to the dinos array and then clears the formDate.now()
link above)