Forums

Home » Alloy UI » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
Ketan Patel
Set water mark text in aui:input tag
May 31, 2012 7:34 AM
Answer

Ketan Patel

Rank: Junior Member

Posts: 69

Join Date: May 4, 2012

Recent Posts

Hi!

I want to set water mark text on aui:input tag. how can I achieve this. Is this achievable with java script?

Any type of help would be appreciated

Thanks,
Ketan Patel
Mario Grimaldi
RE: Set water mark text in aui:input tag
June 1, 2012 6:55 AM
Answer

Mario Grimaldi

Rank: New Member

Posts: 9

Join Date: December 13, 2011

Recent Posts

Ketan Patel:
Hi!

I want to set water mark text on aui:input tag. how can I achieve this. Is this achievable with java script?

Any type of help would be appreciated

Thanks,
Ketan Patel



Hi Ketan,

for water mark text you mean something like this?



If so you can use the placeholder attribute like this:

1
2<aui:input placeholder="placeholder-value" />


If the placeholder value is a key in resource bundle it will be translated!

Hope that helped you!

Mario
Hitoshi Ozawa
RE: Set water mark text in aui:input tag
June 2, 2012 8:28 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Placeholder will also disappear when a text is entered. :-)

OR
did you want some background image to appear in the text area?