These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Field Value Update

pb
Registered: Jan 23 2009
Posts: 27

Hi,
Does anyone know if there is a way to force a text field to update without a loss of focus? I understand that the value of a text field get committed when the field looses focus but I would like to force the text field to update even if the text field has not lost focus yet. I want the client to be able to change the value of the field and see the value they are changing to before they commit the value. I have searched the net and have come across .setValue and commitEdit but these do not work in Acrobat JS. Any help would be greatly appreciated. Thank you very much in advance.
Regards,
Paul

My Product Information:
Acrobat Pro 7.0
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
It's not clear to me what it is you're wanting. You say "I want the client to be able to change the value of the field and see the value they are changing to before they commit the value." Why wouldn't they see the value they are changing to if they are typing the new value?

George
pb
Registered: Jan 23 2009
Posts: 27
Hi George,

For some reason the value in the visible text field does not change until you click off the field, or press enter. Lets say that the current value of the text field is 100. Now suppose the client wants to change it to 90, so they type in 90 but do NOT press enter or click off the field. Now suppose the phone rings and they speak on the phone. When they return to the form, the field still displays 100 even though the client typed in 90 but has not comitted the 90 yet. The fact that the field value has been changed but since it does not update until the client hits ENTER or clicks off the field creates the confusion because the displayed value is the old value and the client thinks that the value has not yet been changed. I hope this makes sense. I would like to have the field displaying the value it has in the event of no change and in the event of a change, the value it is about to commit. Is there any way to do this? Many thanks for your help.
Regards,
Paul
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
I'm still not getting it. So...

Quote:
Lets say that the current value of the text field is 100.
Got it.

Quote:
Now suppose the client wants to change it to 90, so they type in 90 but do NOT press enter or click off the field.
OK, so the text field is showing 90 at this point, the field has the focus, and the insertion point is immediately after the zero, correct?

Quote:
Now suppose the phone rings and they speak on the phone. When they return to the form, the field still displays 100 even though the client typed in 90 but has not comitted the 90 yet.
This is what doesn't make sense to me. If the user enters "90", it should only revert back to the previous value if they then pressed the "ESC" key. Can you explain how, exactly, it's reverting back to the previous value?

George
pb
Registered: Jan 23 2009
Posts: 27
Hi George.

The second point is the issue. If the initial field value is 100 and the client types in, say 90, yes the field value changes now shows 90. The problem is that if the client now types in 70 - without committing the 90 - the field will continue to show 90 and not the 70 that has been typed in. I would like the field to show the 70. Also if the client then changed their mind and typed in 65 instead of the 70, I want the field to show 65. I hope this makes sense.

BTW, there is no issue with the insertion point as the value of the field changes entirely for the first change but does not reflect any changes made after the first one.
Regards,
Paul
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Do you by any chance have Overprint Preview on (Advanced > Overprint Preview)? Do things behave differently if you turn it off?George
pb
Registered: Jan 23 2009
Posts: 27
Hi George,

I had Overprint Preview turned off. When I turn it on, I have the same problems with the script. Incidentally, the script portion that does this is posted in my other post on updating field values, a day or two ago.
Regards,
Paul
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
I see, I didn't realize that you had a script somewhere that was controlling things. I'll take another look at the other post...

George
pb
Registered: Jan 23 2009
Posts: 27
Hi George,

Thank you very, very much.
I truly appreciate your help.
Regards,
Paul