cancel
Showing results for 
Search instead for 
Did you mean: 

How to change text in the Inputfield when cursor focus?

Former Member
0 Kudos

Hi,

I have one inputfield in the view intially it comes with default text.

When ever i put cursor, text should be disappear.

How to achieve this.

Thanks in advance.

~Adams

Accepted Solutions (0)

Answers (3)

Answers (3)

abhijeet_mukkawar
Active Contributor
0 Kudos

hi,

you can write the code in OnEnter action , because there is no event like OnFocus.

so when user enters in the input field the text will be cleared

regards

former_member189631
Active Contributor
0 Kudos

Adam,

I dont think this is possible in WD.

Former Member
0 Kudos

Hi All,

Any one advise on this query?

Thanks & Regards

Sridhar

Former Member
0 Kudos

Usually you put text in the Input Field - as an information for the user to enter the correct details in the input box.

Instead you may put a balloon help for the Input Field. There is a property of the Input Field that you need to set.

Regards,

Subramanian V.

SRudra
Contributor
0 Kudos

Hi,

I think this is possible. Roundabout way like baloon help is another good suggestion. You can create a action for clearing the field and then cal the action in wdDoModifyView method.

IWDInputField Fld = (IWDInputField)view.getElement("FieldId");

Fld.setOnEnter(<action>);

Cheers!!!

Sukanta Rudra

Former Member
0 Kudos

I think this shouldn't work because the onEnter action is the action when the focus is on that field and the user press the "Enter" button.

There isn't is property for onFocus instead.

SRudra
Contributor
0 Kudos

Hi,

I know of only one action i.e onEnter, but see if you can tweak using the code I provided in my previous post. For more details plz see the IWDInputField API docs on usage and refrence and let us know if it worked.

Cheers!!

Sukanta

Former Member
0 Kudos

Thanks all of you for suggesions.

Please can you tell the exact name of the property? I m unable to find that property.

OnEnter is different i dont press enter when cursor is focused in InputField default text would change.

Former Member
0 Kudos

It is called Tooltip property.

Regards,

Subramanian V.

Former Member
0 Kudos

Thanks Subramanian.

But that is not exact solution for my query.Still thanks.

Thanks & Regards

Adams

sid_sunny
Contributor
0 Kudos

Hi Adam,

I guess this is not possible in Web Dynpro.

Regards

Sid