View Full Version : how to know if textfield is edited

22 Jun 2013, 12:56 PM
Hello All ,
This is my first ever post on Sencha.

I have 2 textfields say 1 and 2 . and an action button.
instance 1: now if i enter a value in textfield1 and delete it now i enter something in textfield2 say "3" and click on action button , it should consider textfield1's value as 0 and textfield2 as 3 ..
instance 2: but if i do not take my cursor in either of them and click on button then it should throw an alert.

so in short i wanna know if the textfield has ever been 'touched'(taken the cursor into) by the user until the action button is clicked
i tried isDirty() but it didn work for me .
is there anyway to go about this?


24 Jun 2013, 8:22 AM
isDirty will tell you if the current value does not equal the original value which means it has been edited.