The Holy Grail Has Been Found – Create Forms Fields in InDesign
Your prayers have been answered... Sort of.
NOTE: From the CreativePro Archives
This article is from June 14, 2011 and may no longer be accurate.
*Update #4
TomaxxiFORMS is now updated to 1.4. This update adds support to print and reset buttons by adding -prn and -rst. However, the script does not create a print or reset button via the normal Acrobat method, instead, it uses JavaScript. Because of this workaround, all fields are reset.
Another new feature is the ability to set multi-line text fields by adding the extension -txm.
In addtion, if there is more than 1 field with the same name, just first field is created,
and others are deleted automatically, but there is alert if that happens. It also corrected a few small issues with radio button groups.
The IDML and PDF have also been updated.
*Update #3
TomaxxiFORMS is now updated to 1.3. This new update fixes the tab order problem. The script will now change the tab order to by row in Acrobat. The other news is that you can now create radio button groups. Name each button with a unique name to start, followed by _rad and then another _group name. Ex – mac_rad_computer or win_rad_computer
I have also updated the IDML and PDF assets to include radio buttons for your own testing.
*Update #2
There is a now another update to the script available here and the other links in the article. This update adds an icon and a version number, 1.2.
If you are using Acrobat X, you can now to run an action instead of having to install the JavaScript. To install the action, download the script and sequence and unzip into a folder. Next, go to file > action wizard > edit actions. In the dialog, click import and browse to the sequence file. The next time you want to convert your buttons into form fields, go to file > action wizard > tomaxxiFORMS and the script will run.
*Update #1
I woke up with morning with an email from Marijan who has updated the script. Apparently, tool tips are transferred. The next part is the best, we can now setup other form fields with the following codes.
_txt – text field
_chk – check button
_rad – radio button
_sig – signature
_lbox – list box
_cbox – combo box
Last month at the InDesignSecretsLive Print & ePublishing Conference Tony Harmer presented an amazing feature request to Adobe via a poem during his ignite presentation. Like a lot of users, he had been waiting for native form field creation inside InDesign, but at the conference Adobe didn’t really seem to provide much of an answer other than ” file a feature request”.
After feeling hopeless about this feature, I kind of forgot about it until a few days ago when I came up with an idea. Since it is possible to create buttons inside InDesign and have them transfer without any issues, why not run a script inside Acrobat that looks for buttons and convert them into text form fields? I sent a message to Marijan Tompa, an author of many amazing scripts, and asked him if it was possible for Acrobat to do this via scripting. After explaining my idea to him, he sent me a prototype script in 15 min!
Over the new two days we worked out some bugs, but now we are ready to share it with you. At the end of the article I have links to download the script and a sample form via a IDML and PDF.
How the Script Works
Begin by designing your form as normal inside InDesign. When you are ready to create the form fields, I recommend that you create a layer for the form buttons.
Next, draw empty frames (no formatting) wherever you would like text fields to be in your layout. After creating all of your text fields, convert each of them into a button. It is not necessary to give them any attributes like actions or appearances.
Name each button with the text field name that you would like (Phone). However, you need to add an underscore followed by txt after the name. (Phone_txt). This _txt is what the script will look for when it converts it into a text field. The script will ignore the buttons that do not have _txt in their filename.
Exporting to PDF
After finishing the layout, export your form to an interactive PDF. In the export options, be sure to create a tagged PDF. The most important thing to remember is to “Include All” under Buttons and Media, otherwise the buttons would not be included.
Installing the script
In order to run the script, you will need Acrobat Pro. I have tested the script on Acrobat Pro 9 and X. After downloading the script and unzipping, just copy the script to the following folder depending on your OS and Acrobat Version. You might need to restart Acrobat in order to run the script.
Acrobat 9 – Mac
Applications > Adobe Acrobat > right click or ctrl-click on the software icon > Display package > Contents > MacOS > JavaScripts
Acrobat X – Mac
Users > [user account] > Library > Application Support > Adobe > Acrobat > 10.0 > JavaScripts
Acrobat 9 – PC
Program files > Adobe > Acrobat > JavaScripts
Acrobat X – PC
Program Files > Adobe > Acrobat 10.0 > Acrobat > JavaScripts
Running the Script
Now that you have the script installed, open your PDF in Acrobat Pro. When you run the script, it will only take a second or two and all of your buttons with _txt will now become text form fields. Be advised that the script will add another underscore to the name of the field
Example: Phone_txt will become Phone_txt_
In Acrobat 9, go to the tools menu and you will see tomaxxiFORMS. Select this option to run the script.
In Acrobat X, click on tools and at the bottom, open up Add-on Tools and you will see the tomaxxiFORMS script. Click on the script to run it.
Assets
TomaxxiFORMS Script version 1.3 (unzip after downloading)
IDML Form (for testing)
PDF Forms (start and end)
This article was last modified on December 14, 2022
This article was first published on June 14, 2011







