6 Replies Latest reply on Jan 22, 2009 6:48 AM by (Michael_Palladino)

    Copying data to multiple fields

      I have a number of forms which have been created in Acrobat 8 Professional using the Acrobat tools (not LiveCycle) where I need data entered in one field to copy to another. Usually this data is text. I have used the following Javascript in the Calculate tab in field properties:

      event.value = this.getField("SOURCE FIELD").value;

      In order to allow for a single point of data entry, the fields to which the data is copied are locked and flagged as read only. Most of the time this works, however I have been getting multiple support calls where the forms fail to follow the script. I've tried many options including PDF optimization. I've ensured that users are using the same version of Acrobat Reader (8.1.2).

      Is there a better way to accomplish this task?
      Is there something wrong with the JavaScript?
      I'm not very sophisticated with Javascript and would appreciate any assistance. Thanks!
        • 1. Re: Copying data to multiple fields
          gkaiseril MVP & Adobe Community Professional
          Do any JavaScripts work with the problem systems? The user's may have the JavaScript preference turned off in Acrobat.
          • 2. Re: Copying data to multiple fields
            Level 1
            Yes...some of them work. This has been a very strange problem. For example, one field may fail to copy but other fields on the same form do complete the copy.
            • 3. Re: Copying data to multiple fields
              George_Johnson MVP & Adobe Community Professional
              There is a user preference that controls whether automatic calculations are performed. Perhaps some users have turned this off. The most likely possibility is the field calculation order is not correct.

              If you've checked both of those things and it still doesn't work, can you give an example of some text that this doesn't work with?

              A different approach that avoids these issues is instead of setting up a custom calculation script in the read-only field, you can use something like the following in the Validate script of the text entry field:

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

              This way it will work if automatic calculations are turned off, and the calculation order doesn't come into play.

              • 4. Re: Copying data to multiple fields
                MarkWalsh Level 4
                Is there anything entered into the 'Format' tab? The format will run after the Calculate, so it could be changing there if there is.
                • 5. Re: Copying data to multiple fields
                  I like that suggestion, but does it work if you are opening several form via check boxes. The forms are opening in separate windows also.

                  Example : if I enter victims name on my primary form, will this option work on another form I opened in a separate window?

                  • 6. Re: Copying data to multiple fields
                    in Adobe Designer 7.0 I would like to know if it is possible to do the following.
                    Can you make an object have multiple values when using the global settings.
                    I have a radio button or check box that I would like selected depending on what fields are selected. I can configure single values for an object , but what if that object needs to be configured to be selected for value 0 and value 1. How do you configure a button to be selected for both value 0 and value 1 in the form. Thanks for your help.