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

Character Count from Fillable PDF?

New Here ,
Oct 15, 2018 Oct 15, 2018

I'm trying to make a smart order form and I'm stuck on a field. I'm pretty sure the answer is "Javascript" but I'm hilariously out of practice with that so I'm hoping you can help!

I need to calculate cost for a personalized item. The cost is based off the number of characters in a string.

So basically it looks like:

Personalization: [fillable text field here]

Character Count: [number of characters in Personalization field]

Total Cost: [$0.50*character count]

I can get the total cost (a simplified field notation) but is there a way to automatically generate the character count?

TOPICS
PDF forms
4.0K
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 15, 2018 Oct 15, 2018
LATEST

Sure. Use this code as the custom calculation script of the Character Count field:

event.value = this.getField("Personalization").valueAsString.length;

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
Community Expert ,
Oct 15, 2018 Oct 15, 2018
LATEST

Sure. Use this code as the custom calculation script of the Character Count field:

event.value = this.getField("Personalization").valueAsString.length;

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