Skip to main content
Known Participant
October 10, 2016
Answered

unselect limit number of characters & comb of characters or both

  • October 10, 2016
  • 2 replies
  • 1245 views

hi, i want to unselect "limit number of characters & comb of characters" in text fields. is that possible to do it using JavaScript??. what that JavaScript should do is, it should go true all the text fields & remove selected "limit number of characters or comb of characters" options. thanks..

This topic has been closed for replies.
Correct answer Karl Heinz Kremer

Yes, you can do this via JavaScript. You can create e.g. an Action and then run this action on one or more documents and modify them. You need to loop over all fields, look for text fields and then modify the properties of these text fields.

Take a look at the properties of the Field object - specifically Field.comb (Acrobat DC SDK Documentation ) and Field.charLimit (Acrobat DC SDK Documentation )

2 replies

Karl Heinz  Kremer
Community Expert
Karl Heinz KremerCommunity ExpertCorrect answer
Community Expert
October 10, 2016

Yes, you can do this via JavaScript. You can create e.g. an Action and then run this action on one or more documents and modify them. You need to loop over all fields, look for text fields and then modify the properties of these text fields.

Take a look at the properties of the Field object - specifically Field.comb (Acrobat DC SDK Documentation ) and Field.charLimit (Acrobat DC SDK Documentation )

omanbuxAuthor
Known Participant
October 11, 2016

hi, thanks a lot for your TIP. i have created bellow code & it's work perfectly. thanks again..

for (var i = 0; i < numFields; i++) {

var f = getField(getNthFieldName(i));

f.comb = false;

f.charLimit = false;

try67
Community Expert
Community Expert
October 10, 2016

Yes, it's possible to do that with a script. Just set the field's charLimit property to 0 to achieve it.