Copy link to clipboard
Copied
I am composing my fourth PDF form. I am making forms to collect data from different instruments. They all collect different data thus the need for different sheets but I have a set of fields common to all that are named the same from document to document. So I can export the 15 data fields that I need from each form into one data file. (Thus naming the fields the same is not an option). In my other form I have a drop down field. I have it set to fill in a number 1 or 2 based on the selection. In this field I run a javascript on Blur to autopopulate the other fields that need this same information. In the newest form I am working on I copied the parent field straight from the other form the child fields are only populated one at a time. You need to click on and off of that cell to get the numbers to populate. Each Blur event gives you one more number. There are a couple of other dropdowns in this document that work the same way (only one autopopulate per click). The others I can use work arounds on but this particular one needs to work the way I think it should. Is there some setting that could be different in this form than the other?
I have been pushing the autopopulate field out from the parent field. Is there an easy script I can run to make a child field equal a parent field, without naming them the same? Mostly I'm just confused how it works differently when copied from one form to another. I tried deleting it an starting from scratch and got the same results.
Any help is appreciated from this Newbie. I have learned a lot from you all to get me this far. Thanks!
Copy link to clipboard
Copied
I've moved this from the Using the Community forum (which is the forum for issues using the forums) to the Acrobat forum.
Copy link to clipboard
Copied
Thanks sorry about that.
Copy link to clipboard
Copied
Using the On Blur-event is not a good way of doing it. You should use the Calculate event of the "child" field, with the following code:
event.value = this.getField("parent field name").valueAsString;
Copy link to clipboard
Copied
Thanks so much. I will try that out. I knew there had to be a different way to do it. The on blur event was working well until I got to this form. You have been super helpful to get me this far through various posts. Thanks again Try67!