Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Populate other fields based on one field

New Here ,
Nov 13, 2017 Nov 13, 2017

What I'm trying to do is set up my pdf file so that if I choose one name from a drop down list, it will automatically populate other fields with pertinent information for that name, such as DOB, address, phone number, etc. I cannot seem to figure this out, and I'm just going in circles at this point. I sure hope someone can help me out.

TOPICS
PDF forms
10.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2017 Nov 13, 2017
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2017 Nov 13, 2017

This can be done using a script. For example, see: https://acrobatusers.com/tutorials/change_another_field

I've developed a tool that allows you to set it up easily and quickly, without having to write any code.

If you're interested you can find it here: Custom-made Adobe Scripts: Acrobat -- Populate Fields From Dropdown

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2017 Nov 15, 2017

I'm still beating my head against the wall. Would anyone be willing to take a look at my script and see if you can figure out what I've done wrong? I'm new to this, and I'm getting really frustrated. I think I've stared at it so long, that it's all running together. Ugh.

Under format on my combo box drop down, I have custom keystroke set up as

if( event.willCommit )

{

   if(event.value == " ")

     this.resetForm(["Breeder","Sex","DOB","RegNum","RegName","Sire","Dam"]);

   else

     SetFieldValues(event.value);

And for my script under "document level" i have a script named SetFieldValues with

// Place all pre-population data into a single data structure

var DogData = { Ace :{ Breeder: "Sherita Tabner & Carol Enz",

        Sex: "Male",

        DOB: "11/17/2015",

        RegNum: "HP488851/01",

        RegName: "Rose Hill Kachina Stroker Ace",

        Sire: "FC Rose Hill Classic Photo SC",

        Dam: "Rose Hill Absolut" }

    Sally :{ Breeder: "S. Tabner, C. Enz, A. McCabe",

        Sex: "Bitch",

        DOB: "11/24/2015",

        RegNum: "HP487173/02",

        RegName: "Rose Hill Kachina Mustang Sally",

        Sire: "FC Rose Hill Barracuda SC",

        Dam: "Kyrov Rose Hill Calliandra"}};

function SetFieldValues(cCallName)

{

  this.getField("Breeder").value = DogData[cCallName].Breeder;

  this.getField("Sex").value = DogData[cCallName].Sex;

  this.getField("DOB").value = DogData[cCallName].DOB;

  this.getField("RegNum").value = DogData[cCallName].RegNum;

  this.getField("RegName").value = DogData[cCallName].RegName;

  this.getField("Sire").value = DogData[cCallName].Sire;

  this.getField("Dam").value = DogData[cCallName].Dam;

}

So, what am I doing wrong? All of it? Or did I miss something? I have several other dogs that need to be added, but until I can figure ot what's going on, I'm not going to spend a couple hours doing it.

Help?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 16, 2017 Nov 16, 2017

Can you share the form?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2017 Nov 16, 2017

Yes, if I can figure out how. I'll try to do that as soon as I get home. Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2017 Nov 16, 2017

Try as I might, I cannot figure out how to upload the document. So, instead, I've put it on my website where it should be easily accessed.

www.rabbitz.net/ENTRYworking.pdf

Hopefully you can open it and see the code. I'm just at a loss at this point, and disgusted.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 17, 2017 Nov 17, 2017

Use this:

if( event.willCommit )

{

   if(event.value == " ")

     this.resetForm(["Breeder","Sex","DOB","RegNum","RegName","Sire","Dam"]);

   else

     SetFieldValues(event.value);

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 17, 2017 Nov 17, 2017

Still no luck Any other ideas? When I choose a name from the combo box, I get no response from the document

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 18, 2017 Nov 18, 2017

Look for errors in the debugger.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 19, 2017 Nov 19, 2017

Thanks for the suggestion. I do appreciate all of your help, but I give up. It's apparent that my brain does not comprehend what I need it to in order to figure this out. I'll have to figure out a way other than using javascript.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2017 Nov 15, 2017

I don't mind paying someone to help me sort this out. I need this thing done. I'll probably never need it again, but I sure need this one now.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 20, 2017 Nov 20, 2017
LATEST

I finally figured it out, but it wasn't with either of the examples above. I set up a keystroke custom script, and a validation script with all the information I needed to show up. Now, it works like a charm

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines