PDF Forms Using Acrobat and LiveCycle Designer Bible (Bible #545) by Ted Padova & Angie Okamoto
Author:Ted Padova & Angie Okamoto
Language: eng
Format: epub
Publisher: John Wiley & Sons
To format the field for changing text color, we use the text field's Format tab and write a custom JavaScript. Here's how to do it.
For these steps, use the globalTransferFields.pdf form found in the Chapter 17 folder on the book's CD-ROM.
STEPS: Changing Text Colors
1. Open a form in Acrobat. In our example, we used the globalTransferFields.pdf form from the book's CD-ROM.
2. Open the US Dollars Text Field Properties window. Using the Select Object tool, double-click the US Dollars text field.
3. Open the Format tab. Click Format in the Text Field Properties window.
4. Open the Custom Format options. Choose Custom from the Select format category drop-down menu.
5. Open the JavaScript Editor. In the Custom Options of the Format tab, you have two areas where you can use a JavaScript. The top item is the Custom Format Script area. We want to use this option to add our script for custom formatting. Click the first Edit button adjacent to the Custom Format Script window shown in Figure 17.11 to open the JavaScript Editor.
6. Add the following script in the JavaScript Editor:
1. var f = event.target;
2. if (f.value > 10000)
3. f.textColor = color.red;
4. else
5. f.textColor = color.black;
7. Click OK in the JavaScript Editor. You return to the Format tab in the Text Field Properties window. When you return to the Format tab, the script appears in a scrollable window, as shown in Figure 17.11.
8. Click Close, and save the file.
FIGURE 17.11
Add a JavaScript to the Custom Format Script area in the Format tab.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7478)
Supercharging Productivity with Trello by Brittany Joiner(6742)
Mastering Tableau 2023 - Fourth Edition by Marleen Meier(6502)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6431)
Inkscape by Example by István Szép(6360)
Visualize Complex Processes with Microsoft Visio by David J Parker & Šenaj Lelić(6052)
Build Stunning Real-time VFX with Unreal Engine 5 by Hrishikesh Andurlekar(5064)
Design Made Easy with Inkscape by Christopher Rogers(4677)
Customizing Microsoft Teams by Gopi Kondameda(4213)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3950)
Business Intelligence Career Master Plan by Eduardo Chavez & Danny Moncada(3846)
Extending Microsoft Power Apps with Power Apps Component Framework by Danish Naglekar(3801)
Salesforce Platform Enterprise Architecture - Fourth Edition by Andrew Fawcett(3681)
Pandas Cookbook by Theodore Petrou(3661)
The Tableau Workshop by Sumit Gupta Sylvester Pinto Shweta Sankhe-Savale JC Gillet and Kenneth Michael Cherven(3462)
TCP IP by Todd Lammle(2998)
Exploring Microsoft Excel's Hidden Treasures by David Ringstrom(2933)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2932)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2895)
