Topic: In-place form editing with sample text?

Let's say I am displaying a page about a person, and I want to offer in-place editing of a given attribute, say, Person.firstname.  In the event Person.firstname is nil, I want to show something like "Enter a First Name" as a placeholder text.  We need to show this placeholder text if we initially load the page and Person.firstname is nil, and we also need to show this placeholder text if the user edits a Person.firstname to nil while on the page.  Is there are a good recipe available for this, which I am sure is a common issue?