Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe Editor - Automatically Add Comma after Text Field, no matter what length the text field is

Community Beginner ,
Oct 25, 2019 Oct 25, 2019

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?

5.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Oct 25, 2019 Oct 25, 2019

You can use this code as the field's custom Format script:

if (event.value) event.value+=",";

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 25, 2019 Oct 25, 2019

Maybe you need MS Word with grammer and spelling suggestions? Are you using Acrobat or another Adobe application?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 25, 2019 Oct 25, 2019

I'm using Adobe Acrobat 2017.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 25, 2019 Oct 25, 2019

Getting you to the right community. Maybe volunteers here will be able to help you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 25, 2019 Oct 25, 2019

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 25, 2019 Oct 25, 2019

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!

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 25, 2019 Oct 25, 2019

You can use this code as the field's custom Format script:

if (event.value) event.value+=",";

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 25, 2019 Oct 25, 2019

Oh my gosh, it worked. You are fantastic, thank you so much for your help with this 🙂

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 07, 2020 Aug 07, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 07, 2020 Aug 07, 2020

event.value = "For " + this.getField("Name").valueAsString + ":";

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 07, 2020 Aug 07, 2020

thanks.  you are the best!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 23, 2024 Jan 23, 2024

I can't make that work.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 30, 2025 Jan 30, 2025

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2025 Jan 30, 2025

- Where did you place it?

- What happens when you use it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 31, 2025 Jan 31, 2025
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines