Hi,
I would like to be notified immediately when a user starts typing into an Infopath form.
I was told that waiting for a context change event is not sufficient, so our code periodically called the flushDocument method and then did some comparisons in order to find out whether any form modification was done and whether to perform any further action.
This approach worked fine for some time for us.
Now we needed to deal with a form which had a form field validation (the given form field value must be 5-10 characters) and the following problem appeared:
While the user was typing the form field value, our periodic check called the flushDocument method, which obviously calls the form field validation (depite the user was not trying to leave the form field). For at that particular moment the form field value did not meet the required criterion yet, a validation error "The value must be 5-10 characters" was displayed.
Because of some performance reasons we have the periodic check set to run quite often (once a second) which in this particular case forces the user to click the validation error message after each character they type into the form field.
Is there any other way how to get informed the user just started filling some form data WITHOUT running the form field validation?
I'll be grateful for any hint...
Thanks,
Radek