Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMelissa Franklin
7,863 PointsWhy do we leave in "Dog" when we are resetting the form field for species? $species.val("Dog");
The other form fields have empty quotation marks...
$name.val(""); $species.val("Dog"); $notes.val("");
1 Answer
Steven Parker
231,269 PointsThe text input fields are set empty by default, but the species field is a select
, and it is not configured to have a blank as a choice. "Dog" was chosen as the default selection, but you could easily use one of the other possible options as a default instead.
Personally, I think "Narwhal" makes a better default as it would encourage the user to make another selection.
Melissa Franklin
7,863 PointsMelissa Franklin
7,863 PointsThank you!