Placeholder text for property editors
Last week I ran into a (slightly hidden) feature in EPiServer that I think could be quite useful in many scenarios. So let's share it!
What I found it that it's possible to add placeholder/watermark text to the property editors. That is accomplished by setting the "Promt" property on the "Display" attribute for the property. So this code:
[Display(Prompt = "Enter title here")]
public virtual string Title { get; set; }
Would generate this:
The caveat to all this is that it will only work for "simple" property editors. I tested it on basic textboxes and date selectors, and it worked great. However, for more complex ones, e.g. a content area editor, the placeholder text will not be shown.
Nice!
Nice! To bad it doesn't work for contentareas.