Jump to content

How can I specify a placeholder text


KingOrmon

Recommended Posts

Sencha controls has a PlaceHolder property that allow me set a default text what a edit is empty.

PlaceHolder and default text are different things. I checked uniedit in FireBug but couldn't find PlaceHolder property. Oh well, doesn't matter really, we have a good old DOM...

 

function OnAfterrender(sender)
{
 if ('placeholder' in sender.el.dom) sender.el.dom.placeholder = 'test';
}

Add to UniEdit's ClientEvents.ExtEvents

Link to comment
Share on other sites

Placeholder property is an HTML5 thing, so you'll need some custom scripting to make it work in IE. For example placeholder.js

My advise - just forget IE. 1-2 years from now IE will be autoupdated almost everywhere (unless on XP) to support HTML5. Even if it is not working now, placeholder is not an essential feature you can't live without. It's nice, but not "a must".

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...