Highlighted

How to make a pre-populated text field modifiable

New Here ,
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

35

Likes

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

How to make a pre-populated text field modifiable

New Here ,
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

36

Likes

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
Aug 09, 2020 0
Adobe Community Professional ,
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.

 

Likes

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
Reply
Loading...
Aug 10, 2020 0
try67 LATEST
Most Valuable Participant ,
Aug 10, 2020

Copy link to clipboard

Copied

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;

Likes

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
Reply
Loading...
Aug 10, 2020 1