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

How to make a pre-populated text field modifiable

New Here ,
Aug 09, 2020 Aug 09, 2020

Copy link to clipboard

Copied

Hello,

I am using this command to pull data into one field from another field

event.value=this.getField("Insurance Company").value;

But I want the user to also be able to modify what's in the field. In other words, I want the the pre-populated data to be a default that can be changed.

 

Any ideas?

 

Thanks, Lee

TOPICS
PDF forms

Views

194

Translate

Translate

Report

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 ,
Aug 10, 2020 Aug 10, 2020

Copy link to clipboard

Copied

This was taught to me here in the forums by Adobe MVP try67:

 

 

if  (event.source && event.source.name =="Insurance Company")  event.value = this.getField("Text32").value;

 

 

I recommended this in another thread yesterday to another another user but ACP  Thom Parker, who I also follow for guidance, suggested that  this is not always good idea.

 

I am learning Acroba JavaScript, and I still haven't run into an issue in which this method haven't delivered what I need to work for my forms.

 

Votes

Translate

Translate

Report

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 ,
Aug 10, 2020 Aug 10, 2020

Copy link to clipboard

Copied

LATEST

Replace "Text32" with "Insurance Company", of course, but it should work just fine... Not sure why it's not a good idea, though. An alternative is to do it via the validation script of the other field ("Insurance Company", in this case), like this:

if (event.value) this.getField("Text1").value = event.value;

Votes

Translate

Translate

Report

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