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
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.
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;