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

Carrying over only some of the form field

Community Beginner ,
Apr 30, 2023 Apr 30, 2023

I am trying to figure out how I can put a full middle name in the forst field, but then it only produce the middle initial on certain pages following. Im also trying to do the same with a SSN- only the last 4 populate on certain pages. Can this be done?

TOPICS
Create PDFs , Edit and convert PDFs , How to , Install update and subscribe to Acrobat , PDF forms , Print and prepress
999
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 ,
Apr 30, 2023 Apr 30, 2023

Hi @Nicole23641873ej9u ,

 

Are you currently using any script(s)?

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 ,
Apr 30, 2023 Apr 30, 2023

It can be done by using slice() method.
To get four last numbers of SSN use like this in 'Custom calculation script' of
field where you want to show last four numbers:
var str = this.getField("SSN").valueAsString.slice(-4);
event.value = str;

To get first letter from middle name use slice(0,1).

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 ,
May 01, 2023 May 01, 2023

Your first request is tricky to do correctly. I would advise against it because if you get it wrong people will be upset with you.

For example, if someone's middle name is John-Paul your script might identify it as one word and only use J as the initial, when in fact it's JP. It's best to let people decide for themselves how to write their own name.

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 ,
May 01, 2023 May 01, 2023
LATEST

For what I need it for, it's perfect if itnonly tranlates that one initial unless policy changes. Thank you for letting me know that though.

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