Insert current time if the same field is visible.
Hello!
I'm trying to crate a pdf form, and I have a field called "1" that is a Text Field, and another filed called HoraI1 that is a Text Field too, but it's locked from editing and hiden if the field "1" is currently empty, and it should insert the time when and become visible when the user starts typing, but it will not hide when "1" becomes empty again. I managed to make these features, like, when I start typing, It shows the field and when I erase everything that I typed, it keeps showing, but, I can't find a way to make it insert the current time, because, if I insert a javascript to do this in the field "1", everytime that someone types anything, it changes the time to the current one, so, if it was 09:00 when the user typed something, if he changes after that, like, 09:10, the time changes too until he stops typing. Im trying to make it frozen in the first time that showed up, so, I though about doing something like, keeping the code to show the field "HoraI1" in the field "1", and insert a code into "HoraI1" to detect his own visibility and, if its visible, it will change the value of the field to the current time, so, as the field will not hide anymore, even if the user erase everything or changes the field "1", the field "HoraI1" will keep his visibility to visible, and I think that will keep the current time frozen.
There's a way to make this field detect his own visibility and if its visible, inserts the current time?
Another thing that Im afraid of, is this: The field "1" has the code to show the "HoraI1" when he is not empty, and I think that, if the user starts doing changes, every single letter erased or inserted, it will make another change to the field "HoraI1" to set the visibility to visible, so, I think that, if we put a code to detect the visibility of the "HoraI1", everytime that the "1" sends the "visible" value to the "HoraI1", it will detect that he changed to "visible" again (Even if its already visible) and changes the time to the current one again. If it really starts doing like that, please, help me to make it not happen.
