Jump to content

How can I specify a placeholder text


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...