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

new to acrobat forms - reference fields to other fields

Rachel
Registered: Jul 9 2008
Posts: 14

Hello,

I am trying to create a form where the user enters information into a field that is later used in another place automatically.

How do I create a reference between fields? I tried to set it in the calculate option in field properties, but there are only mathematical options and = is not one of the options.

Also, in another field, I set it to calculate a formula automatically (eg: auto fill field 2 with 25% of field 1).

Thanks in advance for your help!

Rachel

(I am using Adobe Acrobat 9 Pro Extended. This wasn't an option in the product choice...)

My Product Information:
Acrobat Pro 8.1.2, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
If you want whatever is entered in a text field to be copied to a different text field, just give both fields the same name. If you don't want to do that for some reason, the JavaScript you'd use as the second field's Custom Calculate script might be:

event.value = getField("text1").value;

where "text1" is the name of the first field.

George
Rachel
Registered: Jul 9 2008
Posts: 14
Hi,

Thanks for the response! I'm not able to get either of these to work. I have to create the form using LiveCycle Designer, and the javascripts don't seem to work for me.

Do you know the FormCalc script by any chance?

Also - Do you know how I can set field2 to be a percentage of field1 and to calcuate when field1 is exited?

Thanks!

Rachel
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
rachel wrote:
Hi,Thanks for the response! I'm not able to get either of these to work. I have to create the form using LiveCycle Designer, and the javascripts don't seem to work for me.
Yes, the scripts would be different for Designer. I would suggests asking in the Designer forum as someone there may be able to help.

George
Kim_H
Registered: Jul 15 2008
Posts: 2
George_Johnson wrote:
If you want whatever is entered in a text field to be copied to a different text field, just give both fields the same name. If you don't want to do that for some reason, the JavaScript you'd use as the second field's Custom Calculate script might be:event.value = getField("text1").value;

where "text1" is the name of the first field.

George
I am trying to do the same thing, which seemingly should be simple, yet I cannot make it work. I've entered the above script, but rather than get the actual text of the referenced field, I get 0 (zero).

I am trying to keep the target text field, which needs to be a copy of another text field, out of the tab order.

Any help is greatly appreciated.

- Kim
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Interesting. What is the text in the other field? Have you specified a format for the calculated field?

George
Kim_H
Registered: Jul 15 2008
Posts: 2
Thanks for the reply.

The script seems to be working now, I thought I had reset and restarted before, but I guess not.

I very much appreciate your willingness to help, and your original response to Rachel's inquiry.

Take Care,

- Kim
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Whenever weird (and especially intermittent) things are happening with calculated fields, the first thought should be to check the field calculation order.

George