cancel
Showing results for 
Search instead for 
Did you mean: 

Placeholder for input field

Former Member
0 Kudos

Hi All,

How can I put a placeholder for the TextField component in SAPUI5 ? HTML5 provides an property placeholder to make use of this functionality.

Any hints?

Regards,

Noufal

Accepted Solutions (1)

Accepted Solutions (1)

AndreasKunz
Advisor
Advisor
0 Kudos

Hi Noufal,

unfortunately this HTML5 attribute is not supported in IE9 and IE8 which also need to be working with functional parity in SAPUI5.

A workaround could be built in, but this has not been done yet.

In the new SAPUI5 mobile control set, the sap.m.Input control does have a placeholder attribute (IE9 does not need to be supported there...).

If urgently required, you could inherit from TextField, add the "placeholder" attribute and in your renderer use the original renderer, but implement the "renderInnerAttributes" method and render the placeholder attribute there.

But remember to remove this again once the UI5 TextField officially gets this attribute.

Regards

Andreas

Former Member
0 Kudos

Thank you. I shall try it out

Answers (1)

Answers (1)

Former Member
0 Kudos