cancel
Showing results for 
Search instead for 
Did you mean: 

How to add an onClick event on an inputField ????

Former Member
0 Kudos

Dear Experts,

I want to perform some operations when user click on an input field.

So how can I do this ????? Help me......plz....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You cannot have a onClick event to the InputField.

What you can do is create a UI element say Button and then associate a action to this button.

You can associate a action to the OnEnter event of InputField. i.e when the inputField is focused and you press Enter the action is called.

Former Member
0 Kudos

Ok thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Ramakant,

From the actions tab of your view controller create an event handler

with the return type you want..

now you can map the event to the onAction property of the inputfield.

now do the coding for the action which you need to perform inside the Event handlers method..This should solve your problem for sure

Former Member
0 Kudos

Dear Kartikeyan ,

OnAction property generates the event only when user press the Enter key with focus on that perticular inputfield. But I want the event should be generated when user will click on that inputfield.....