>>>>Think that may be overkill - you'll be setting form to pristine even if other inputs are dirty.
>>>>
>>>>>I think I got it to work, but I am continuing tests now. Here is my current code for the directive, let me know if you see problems:
>>>>>
>>>
>>>Do you think saving current form's state in focus event is not going to work? Do you see my variable for saving current form's state?
>>Quick reply so I may have missed something but if the form is NOT dirty there's no point in setting it to pristine. And, as before, if it IS dirty then that may be because an input other than the one you are interested in is dirty......
>>
>So, in the focus event we save current form's status. If it's dirty, it means some other control set it dirty, so we will not reset the form. If it's false (e.g. form was in pristine state), then we need to reset it.
>
>That's my current logic.
OK. Missed that - sounds OK....
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement