Skip to main content
Compubob
Participant
September 12, 2018
Answered

Scripting field formatting

  • September 12, 2018
  • 1 reply
  • 508 views

I need to some how change a large number of fields on a  form that  i should  have built correctly 20/20 hindsight i guess.  I need each of  these fields, on a form to each be formatted as number. 0 decimal points, and  validated to be between 0 and 3  in the validation field. i should have  done  this when it was created, and now there are to many to delete and re-create.  So would and could  Java  script this for me  HELP  Please  thank you

This topic has been closed for replies.
Correct answer Compubob

I am sorry this is just a one time error on my part I was just trying to be lazy and not have to click on each field and change them each one individually, but I will keep your name and inf o if I do ever need it tough thank you very much

1 reply

try67
Community Expert
Community Expert
September 12, 2018

Both the Format and the Validation events can be set using a script, but it's not a very simple task. You would need to use setAction method and provide it with the correct code to do it.

If you're interested, I've developed some (paid-for) tools that can make that task much easier.

This one allows you to set the Format setting of multiple fields to a selected setting (such as Number):

Custom-made Adobe Scripts: Acrobat -- Apply Format to Multiple Text Fields

And this one allows you to apply the same validation script to multiple fields in a single process:

Custom-made Adobe Scripts: Acrobat -- Mass Edit Fields Actions

If you need I can help you write the code to limit the field's value from 0 to 3.

Compubob
CompubobAuthorCorrect answer
Participant
September 12, 2018

I am sorry this is just a one time error on my part I was just trying to be lazy and not have to click on each field and change them each one individually, but I will keep your name and inf o if I do ever need it tough thank you very much