Auto populate an address field with the info also present in the adobe form
Hi! This is in connection with the question I posted earlier https://community.adobe.com/t5/acrobat/need-help-how-can-i-auto-populate-the-mailing-address-with-the-data-in-physical-address/m-p/11744581?page=1#M293206 where I also replied solved as my brother promised to help me do this one. But it turns out he doesn't know it also.
Can anyone please help me or walk me through on how can I auto populate a mailing address (with city, state and zip) with the info found in the physical address (with city, state, zip) just by clicking a checkbox. Friends told me it is done by using java script. I'm new to adobe and have no idea how to do Java script. Please help!
The text fields are:
Physical Address:_______________________ City: _______________
State: ________________________________ Zip: ________________
Mailing Address: ______________________ City: _______________
State: _______________________________ Zip: ________________
I've tried using this script below but it only copies one text field, the physical address only. I don't know how to include the city, zip, and state.
//Set the vars one and two:
var one = this.getField("pstreet");
var two = this.getField("mstreet");
//next check if two is blank and if so, populate it with one’s value
if(two.value==''||two.value==null){two.value=one.value}
Thank you very much!
