• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Why can't I change the format in multiple fields?

Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

Why can't I select a number of form fields and change all their formatting at one time? For example, change a column of text fields to number fields. As it is, I have to change one field at a time. It's laborious, to put it mildly. I understand that it's probably easier to start from the beginning by defining the field as a number. However, when I use "Use current properties as new default", it still requires that I still have to go back to each one and change the decimal places.

TOPICS
PDF forms

Views

8.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

One can use JavaScript to access each field in turn and and change the properties of the individual field. Or when I am creating a column(s) of fields I create one row with the formatting I want. If some calculation is required, then I have to create a custom calculation that can determine the row to be processed and adjust the field names as necessary. And then I highlight the row and use "Create multiple copies" form the context menu, right mouse click.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

Apparently, I wasn't clear. I apologize. I'm new at this. What I want to do is take a column of text fields and change ALL of them from none or text to the number format without having to do it one field at a time. I want to select the entire column and change ALL the fields from one format to another. When I try "Use current properties as new default" in an attempt to create the number fields with NO decimal places, it keeps defaulting to two decimal places which means that I still have to go back and change all of them one field at a time. It's the effectively same amount of effort that it takes to change the format and decimal places one at a time and I've gained nothing. I don't understand why something like this can't simply be done on an entire group of fields.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

I read your explanation of the Java script and it's what I want. However, there's just one of  me and it's not something that I can justify paying $60 to solve. I only have this problem a few times a year. Nonetheless, thanks for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

If you plan your work and work your plan, then life becomes easier. You did not do enough research on how to create forms.

There is also an option on the context menu, right mouse click, "Use Current Options as New Defaults"  which will keep all the settings for the selected field when one selects the field to be used as the model for the defaults.

You do not need to buy the JavaScript code. You can write your own code and run it from the JavaScript console. JavaScript is all plain text and Adobe and Mozilla provide free access to the JavaScript documentation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 19, 2020 Mar 19, 2020

Copy link to clipboard

Copied

I've seen a few posts showing how to do this on a specified array where you have to type in each field. Is there a way to call the current selection as a variable instead of having to manually type them in?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2020 Mar 23, 2020

Copy link to clipboard

Copied

Unfortunately no. 

 

What you can do is write a script to find and set the formatting. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2020 Mar 24, 2020

Copy link to clipboard

Copied

Thom, can you offer any assistance on that script? I'm new to Javascript and don't fully grasp the concept yet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2020 Mar 24, 2020

Copy link to clipboard

Copied

Yes,  field formatting is performed with a script. The predifined formats in the field property dialog are actually done with a script. So all you need to do is identify the script for the formating you want. Then use the setAction() function on the field object to set the script. 

 

Do to do this you need two things, the names of the fields to be modified, and the script for the type of formatting.  So please describe the what it is you want the fields to do. Are the data entry fields? or fields that just display a value (such as a calculated field)?  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 06, 2023 Jul 06, 2023

Copy link to clipboard

Copied

LATEST

"You did not do enough research on how to create forms." Why would you assume that? Many of us are assigned this task at work and have no choice about what software to use. In my instance, I'm editing forms that were created before I arrived. It has nothing at all to do with research.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2018 May 24, 2018

Copy link to clipboard

Copied

I don't understand why something like this can't simply be done on an entire group of fields.

It's often the abandonment of the "wrong" question that brings the right answer:

1. Delete all the text fields in the column, except the first one.

2. Set this field as required (Format : Number or whatever).

3. Give it a name that make sense.

4. Right-clic upon this field and choose : Create Multiple Copies.

5. Enjoy.

It should take less than 30 seconds.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

Thanks for providing a useful solution and not belittling the original question. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 04, 2021 Mar 04, 2021

Copy link to clipboard

Copied

Will doing this just create clones of the first form field that then need to be renamed individually in order to show independent information, instead of all of them showing the same data that's in the original form field?

 

If so, then it's no less laborious than having to manually change the format on every form field. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

You can, using a script, like this one I've developed:

http://try67.blogspot.com/2012/06/acrobat-apply-format-to-multiple-fields.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines