Hi,
I want to handle onItemChange event on one of the item. The problem is if the value in the item is modified manually, the event is getting called. But in case the value is modified using FormAPI's IWItem.setValue() method, the event is not called.
What can be the way around for this?
My requirement is that:
- I have one textare item into which there is a maximum limit of chars.
- When the user has entered the content and if no of chars are exceeding max limit, I give an alert to user to reduce the length of text. I set the focus back to the field.
- In another scenario this field is also auto-populated using IWItem.setValue() method. In that case also I want to alert the user if length is exceeding the max limit. But its not happening as onItemChange event is not getting called in that case.
Any Ideas? Is there any way to handle on key press even on the texarea field? Even that I'll solve my purpose..