Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Sure. Use this code as the custom calculation script of the Character Count field:
event.value = this.getField("Personalization").valueAsString.length;
Copy link to clipboard
Copied
Sure. Use this code as the custom calculation script of the Character Count field:
event.value = this.getField("Personalization").valueAsString.length;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now