Skip to main content
jctremblay
Community Expert
Community Expert
September 20, 2019
Question

Doing a find/replace in a text field value - Acrobat / PDF Form

  • September 20, 2019
  • 1 reply
  • 478 views

This might be simple and might already been discussed. The new community search don’t help me.

Can a regular format script or keystroke script execute a character replacement in the value of a text field? 

Thanks!

This topic has been closed for replies.

1 reply

Inspiring
September 20, 2019

There is no reason one cannot edit the either at the keystroke or when the field entry when the willCommit property becomes true. I would be careful using the format script sine that action only changes the displayed value and not the actual field value.

 

I would use the RegExp object's replace method to edit the string. If you need to replace multiple occurances of a value, you will need to use the global flag.