I have a PDF form created in Acrobat DC. One of the fields is a multi line text field for the name and address. The user inputs the info with carriage returns into a field named Applicant which ends up in a format like:
City, State Zip
I need to extract JUST the second line of this field to populate another text field with that data. So, my second text field would be called StreetAddress and would automatically extract just the second line of input from the text field named Applicant.
Is this even possible? If so, can anyone give me a sample of how this can be accomplished? I don't want to ask the Applicant to input each line into separate fields.
Sure, it's possible. Use this code as the custom calculation script for "StreetAddress":
var fullAddress = this.getField("Applicant").valueAsString; var lines = fullAddress.split("\r"); if (lines.length>1) event.value = lines; else event.value = "";
Thank you so very much! This is an amazingly simple script...but will save me hours of time. try67- thank you once again!!!