Skip to main content
stevev39013105
Known Participant
November 21, 2016
Question

Programmatically de-select Text Field Options

  • November 21, 2016
  • 4 replies
  • 2391 views

How do Programmatically de-select the text field options for "Scroll Long Text" and "Check Spelling"?

These seem to be turned on by default and it drives me nuts. I need a way to de-select these two options for tens if not hundreds of fields at one go.

By the way, the suggestion to select all fields and deselect those two boxes is not gonna help. Been there, done that, expressed profanity.

This topic has been closed for replies.

4 replies

stevev39013105
Known Participant
November 29, 2016

Can anyone help with the original question? I need to do this programmatically, not manually and not field-by-field. Code that can be attached to a button would be fine if the field names can remain undefined. I'm not a programmer or code writer except in the most rudimentary sense and am just looking for help solving this problem.

JR Boulay
Community Expert
Community Expert
November 22, 2016

First, you have to make sure not to select radiobuttons or checkboxes or other non-text fields,

You can select fields in the "Prepare form" pane, where you can sort them by tab order or by alphabetical order.

and second, even if your form has only text fields, it doesn't work

It works fine for me since years.

Acrobate du PDF, InDesigner et Photoshopographe
JR Boulay
Community Expert
Community Expert
November 22, 2016

These seem to be turned on by default and it drives me nuts.

Turn off these 2 options in one field, then right-clic upon this field and choose : Use current properties as new defaults

By the way, the suggestion to select all fields and deselect those two boxes is not gonna help

Why ? It is, however, the simplest method

Acrobate du PDF, InDesigner et Photoshopographe
stevev39013105
Known Participant
November 22, 2016

Use current properties as new defaults only works for manually-created fields. It doesn't work for those created automatically.

The suggestion to select all fields and deselect those to boxes may be simple but it doesn't work. First, you have to make sure not to select radiobuttons or checkboxes or other non-text fields, and second, even if your form has only text fields, it doesn't work. Even a font change won't work although I've learned that it did work for me once when I made sure to select only fields that had all the same font.

try67
Community Expert
Community Expert
November 21, 2016

These properties are, respectively, doNotScroll and doNotSpellCheck. As you can see, they have a reverse nature, so if you want to disable the Scroll Long Text option you need to set doNotScroll as true. And the same for doNotSpellCheck...

You can use a for-loop to iterate over all of the fields in the file and set their properties. Make sure you check their type first, though, as these properties only apply to text fields, of course (well, doNotSpellCheck also applies to editable combo-boxes, to be precise).

stevev39013105
Known Participant
November 21, 2016

That helps but I was hoping to get some code to paste into a javascript action.

try67
Community Expert
Community Expert
November 21, 2016

There's example code that demonstrates how to do what I've described under the documentation of the numFields property of the Document object.