Answered
I'm trying to figure out how to programmatically set a text field's Format property to Number, to allow only numbers to be entered into the field.
In my case, I want the user to enter only digits into a comb field of 8 characters.
I can do this interactively, but I need to set this property programmatically with Javascript.
I've tried something like:
this.getField("fieldname").setAction("Format", 'AFNumber_Format(0, 1, 0, 0, "", false)');
but doing so sets the field to Custom format, and still allows non-numeric input.
Setting this property interactively results in Acrobat not-allowing non-numeric input at all, which is the desired behaviour I'm looking for.
Help will be much appreciated.
This would potentially solve my problem, for I could query a field's Format property, after setting it up interactively first.