Copy link to clipboard
Copied
I am very new to Adobe Editor. I am preparing several letters that I would send out for my business, and I was hoping to find a way to automatically add a comma to specific text fields. Examples of this would include addresses and greetings. I of course could manually type them out, but for sake of time it would be great if Adobe could automatically do this for me. I originally added the comma as part of the PDF, but that doesn't work as well because the comma doesn't always match the length of the address or the recipient of the letter's name. Is there a way for me to have Adobe automatically add this comma?
Copy link to clipboard
Copied
You can use this code as the field's custom Format script:
if (event.value) event.value+=",";
Copy link to clipboard
Copied
Maybe you need MS Word with grammer and spelling suggestions? Are you using Acrobat or another Adobe application?
Copy link to clipboard
Copied
I'm using Adobe Acrobat 2017.
Copy link to clipboard
Copied
Getting you to the right community. Maybe volunteers here will be able to help you.
Copy link to clipboard
Copied
Are you talking about an actual text form field, or are you referring to static contents that you're adding to the PDF?
It's possible with the former, not the latter.
Copy link to clipboard
Copied
I am talking about the form field. Essentially, it would read as follows:
"Dear [Name], "
The [Name] is a form-field, and the comma after is what I would like to be automatically added.
I can't put the comma in the PDF text itself, as the name can vary in length.
Thank you!
Copy link to clipboard
Copied
You can use this code as the field's custom Format script:
if (event.value) event.value+=",";
Copy link to clipboard
Copied
Oh my gosh, it worked. You are fantastic, thank you so much for your help with this 🙂
Copy link to clipboard
Copied
How would this work to add text before the value?
I have a field [Name] and I want the other field to look like "For [Name]:"
Thanks
Copy link to clipboard
Copied
event.value = "For " + this.getField("Name").valueAsString + ":";
Copy link to clipboard
Copied
thanks. you are the best!
Copy link to clipboard
Copied
I can't make that work.
Copy link to clipboard
Copied
Hi There,
I have the same issue and tried the code you suggested but it does not do anything. Do you have any suggestions on how to get it to work?
Copy link to clipboard
Copied
- Where did you place it?
- What happens when you use it?
Copy link to clipboard
Copied
Hi, thank you for your quick response and your willingness to help.
This is the merge field I am using: {{Matter.PrimaryClient.FirstName}}. I clicked into the text box, navigated to the "format" tab, selected "custom" for the format category, and then edited the custom format script to read: if (event.value) event.value+=",";
When I generate a merged PDF, only the merge field populates, but the comma does not appear. No error message appears at any point.
Lavanya K. Carrithers
[Admin removed P.I. ]
The information contained in this email communication is confidential and is subject to legal privilege, including but not limited to attorney work product. All information contained in this communication is intended solely for the use of the individual(s) or entity(ies) named as the recipient(s). Dissemination, distribution, or reproduction of this communication by any person(s) or entity(ies) other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please contact me as soon as is reasonably practical. Thank you for your cooperation.

