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 trial

JavaScript Treehouse Club - MASH MASH - CSS CSS in Dev Tools

Adding placeholder text and getting it to work?

Because I'm making so many changes, I wanted to add some placeholder text to the fields so that I wouldn't have to keep typing in my values. But when I did that (using placeholder="texthere" in the input) it still runs as Undefined. Is there a way to make that text stay there/work/function like actual text? Thanks!

Tony Nguyen
Tony Nguyen
24,934 Points

Do you have the full code so that we can see where it went wrong?

1 Answer

You can hard code the html element to already include the value text. Example Here

Thanks! I tried changing placeholder to value and it still returns Undefined. Edit - Now it's working. Weird. Thanks for your help!