<< Click to Display Table of Contents >> Navigation: PDF-XChange Editor Plus V9 User Manual > Tabs Guide > Form Tab > Add Dropdown Menus to Documents |
Dropdown menus enable the selection of one option from a fixed list of options:
Figure 1. Example Dropdown Menu
The functionality of PDF-XChange Editor enables a wide range of dynamic customization for dropdown menus. Click the dropdowns below for further information:
1. Click the Form tab, then click the Dropdown icon (highlighted in the image below). A blue rectangle will be displayed at the location of the pointer. This rectangle represents the dropdown menu:
Figure 2. Active Dropdown Menu Tool
2. Move the rectangle to the desired location and then click to add the dropdown menu to the document. Added dropdown menus appear as detailed below:
Figure 3. Added Dropdown Menus
•Click and drag the yellow control points to resize dropdown menus. •Use the options in the Format Tab to determine the style and appearance of selected dropdown menus:
Figure 4. Format Tab, Dropdown Menus
•Click Select Fields to select and edit form fields. •Click the options in the Form Fields group to enable alternative form field formats. •Click Keep Mode to create multiple dropdown menus consecutively. If this option is disabled then PDF-XChange Editor will revert to the designated default tool after the creation of a single dropdown menu. •Click Tab Numbers to show/hide the tab order numbers of form fields. •The Calculation Order setting is not available for dropdown menus. •Click Grid to enable/disable the grid, which is used to assist in the accurate placement of form fields, as detailed in (figure 4). •Click Create Multiple Copies to create multiple copies of selected form fields, as detailed here. •Click Fields to show/hide the Fields pane, which is used to view/edit form fields. •Click Fill Color to determine the fill color of the dropdown menu. •Click Stroke Color to determine the border color of dropdown menus. •Click Width to determine the width of dropdown menu borders. •Click Border to determine the style of dropdown menu borders. •Use the Font and Font Size dropdown menus to determine the font and font size used for dropdown menu items. •Use the Text Color dropdown menu to determine the color of the font used in dropdown menu items. •Click Properties to open the Dropdown Properties pane, which enables the customization of additional elements of dropdown menus and is detailed in the section below. |
The Dropdown Properties pane can be used to determine a range of style and functionality options for dropdown menus. For example, it is possible to use the Actions properties to add multiple dynamic actions to dropdown menus, such as running JavaScript, launching web links and opening files on the local computer. (JavaScript is a high-level programming language that can be used to perform custom operations. See here for an index of existing JavaScript operations that the PDF-XChange Editor forms can use, as well as additional information about JavaScript). Click Select Fields to select form fields, then click the desired field and click Properties in the Format tab to open the Dropdown Properties pane:
Figure 5. Dropdown Menu Tool, Dropdown Properties Pane
The options detailed below are available in the Dropdown Properties pane:
The General properties determine the general parameters of dropdown menus: •Read Only determines whether or not the dropdown menu can be edited. •Locked determines whether or not the dropdown menu can be moved, and whether or not its properties can be modified. •Field Name determines the name of the dropdown menu. This name is present when the Edit Form tool is selected, and when dropdown menus are listed in the Fields pane. •Tooltip determines the information displayed when the pointer is hovered over the dropdown menu. •Mapping Name determines the mapping name that the dropdown menu uses. This name is used to reference interactive form data when the form is exported, and does so without affecting the appearance of the name in the original document. •Orientation determines the orientation of the dropdown menu. •Visibility determines the visibility of the dropdown menu. •Required determines whether or not the dropdown menu is a required field. Required fields must be filled before documents that contain them can be submitted. •Exportable determines whether or not the dropdown menu data can be exported from the form. •Layer determines the optional content layer to which the dropdown menu belongs. When a field belongs to an optional content layer, it displays only when the layer is enabled. Use the Layers pane to view/create/edit layers, as detailed here.
The Style properties determine stylistic elements of dropdown menus. They are detailed beneath (figure 4).
The Position properties determine the position and dimensions of dropdown menus: •Left determines the distance of the dropdown menu from the left margin. •Top determines the distance of the dropdown menu from the bottom of the page. •Width/Height determine the width/height of the dropdown menu.
The Default Text Format properties determine the default properties when text is entered into the dropdown menu: •Font determines the font used to create the dropdown menu entries. •Font Size determine the size of the font used to create the dropdown menu entries. •Text Color determines the color of the font used to create the dropdown menu entries.
The Options properties determine additional options for dropdown menus: •Combo Box Items determine the options in the dropdown menu. See below for an example on how to add/edit options in the dropdown menu. •Sort Items arranges the listed items numerically and/or alphabetically. Note that numerical sorts are performed before alphabetical sorts in cases where both sorts apply. •Allow Edit enables a text box at the top of dropdown menus that can be used to enter custom values as the value of the dropdown menu:
Figure 6. Standard Dropdown (left) and Allow Edit Dropdown (right)
Please note that this property can also be used to give dropdown menus a title that is different from the entries that it contains. An example of this process is detailed below.
•Check Spelling is available only when the Allow Edit property is enabled, and auto-checks the spelling of custom values entered into dropdown menus. •Immediately Commit saves selected values as soon as they are selected. If this option is not enabled then the value is saved only when the user tabs out of the current field/clicks a different form field.
The Actions properties determine the action taken when users interact with the dropdown menu: •Mouse Down initiates an action when the left mouse button is pressed (without being released). •Mouse Up initiates an action when the left mouse button is clicked (pressed and released). •Mouse Enter initiates an action when the pointer moves into the dropdown menu. •Mouse Leave initiates an action when the pointer moves out of the dropdown menu. •On Focus initiates an action when the dropdown menu is selected. •On Blur initiates an action when the dropdown menu is deselected. •Click the ellipsis icon on the right of actions to add/edit dropdown menu actions:
Figure 7. Dropdown Properties Pane, Action Ellipses
The process of adding actions is detailed here.
The Format Value properties determine the type of information permitted to be entered in the dropdown menu and the format in which it should be entered. This setting applies to both predefined items in the dropdown list, and custom entries entered when the Allow Edit property is enabled: •Category determines the category of the dropdown menu. Each category has different options, as detailed below: •None is the default setting. Dropdown menu do not have a Format Value category when this option is selected. •Number sets the dropdown menu input to numerical values. The following options are available for this setting: •Decimal Places determines the number of decimal places displayed. •Separator Style determines the separators used for numbers. •Currency Symbol determines the currency symbol used in the dropdown menu. •Symbol Location determines the location of the currency symbol in relation to the number. •Add Space inserts a space between the currency symbol and the number. •Negative Number Style determines how numbers with negative values are displayed. •Percentage sets the dropdown menu input to percentage values. The following options are available for this setting: •Decimal Places determines the number of decimal places permitted. •Separator Style determines the separator used for numbers. •Date sets the dropdown menu input to date values and adds a dropdown calendar to the dropdown menu. Use the Date Format parameter to determine the format of dates. •Time sets the dropdown menu input to time values (hours and minutes). Use the Time Format parameters to determine the format of time values. •Special sets the dropdown menu input values to one of the special options. Use the Special Format parameter to determine the format. The options are: •ZIP Code •ZIP Code +4, which is used for nine-digit postal codes. •Phone Number •Social Security Number •Custom Action adds custom JavaScript actions to dropdown menu. There are two options: •Format Action is used to enable custom JavaScript for formats. Click the ellipsis icon to add/view JavaScript. •Keystroke Action is used to enable custom JavaScript for keystrokes. Click the ellipsis icon to add/view JavaScript. •If the options above are used then the Edit Action: "Run a JavaScript" dialog box will open. Enter the desired JavaScript for the action and then click OK:
Figure 8. Edit Action: "Run a JavaScript" Dialog Box
The Value Validation properties determine the validation of values entered into the dropdown menu: •Validation determines how values are validated: •Value in Range sets the range within which values entered into the dropdown menu must fall: •From specifies the minimum value. •To specifies the maximum value. •Custom enables the use of custom JavaScript in order to validate values entered in the dropdown menu. Click the ellipsis icon to add/view custom JavaScript, as detailed in (figure 8).
The Value Calculation properties determine the value of dropdown menu from other dropdown menus: •None specifies that calculations are not performed. •Sum uses the sum of specified fields. •Product uses the product of specified fields. •Average uses the average of specified fields. •Minimum uses the minimum value of all the specified fields. •Maximum uses the maximum value of all specified fields. •Please note that when the Sum, Product, Average, Minimum and Maximum properties are used, the additional entry "Fields"will appear beneath the Calculation property. Use this entry to specify the fields used in these calculations. •Simplified Notation enables the insertion of a custom calculation to be performed on fields. Use the Simple Notation box to determine the calculation. Use the document field names and standard mathematical notation (+, -, *, /) to specify the calculation. If there are spaces in form field names then they must be entered in quotation marks. For example: Field1 + Field 2 / "Division Field" * 64. •Custom Action enables the use of custom JavaScript in order to perform calculations and determine the order in which calculations are performed. Click the ellipsis icon to add custom JavaScript, as detailed in (figure 8). |
Follow the steps below to add/edit dropdown menu items:
1. Click Select Fields in the Form tab and select the dropdown menu, then click the Format tab and click Properties. The Dropdown Properties pane will open:
Figure 9. Selected Dropdown Menu
2. Move to the Combo Box Items property and click <Empty>:
Figure 10. Dropdown Properties Pane, Combo Box Items
The Dropdown Menu Items pane will open. This pane is used to add/edit dropdown menu items:
Figure 11. Dropdown Menu Items Pane
3. Click Add New to add new entries to the dropdown menu:
Figure 12. Dropdown Menu Items Pane
•Click Delete Item to delete the selected item from the dropdown menu. •Click the Up and Down buttons to move selected items up or down in the list. The order of items in the pane represents the order to items in the dropdown menu. •Enter values in the Export Value column to determine the value given for exported dropdown menu items. Note that values must be first selected in the Dropdown Menu Items pane and then clicked in order to edit the name. •Click to select Display Value names, and then click them again in order to edit the name. •Select the check box of the item to be used as the default selection in the dropdown menu. This item will be selected when the dropdown menu is in its default state. •Click and drag the yellow control points to resize the dropdown menu as desired.
4. Click outside the Dropdown Menu Items pane to complete the process, then enable the Hand Tool to select dropdown menu items:
Figure 13. Completed Dropdown Menu |
The following example details a simple value validation of values entered into the dropdown 'Dropdown1':
Figure 14. Value Validation Example, Dropdown Menu
This example will detail how to validate that values entered into 'Dropdown1' fall in the range 0-100:
1. Click the Form Tab, then click Select Fields and select the dropdown menu.
2. Click the Format tab, then click Properties. The Dropdown Properties pane will open:
Figure 15. Value Validation Example, Dropdown Properties Pane
3. Scroll down the Dropdown Properties pane to the Format Value tab, then click the Category property and select Number:
Figure 16. Value Validation Example, Category Property Options
4. Scroll down the Dropdown Properties pane to the Value Validation tab, then click the Validation option and select Value in Range:
Figure 17. Value Validation Example, Validation Property Options
Note that the From and To options will appear beneath the Validation property when Value in Range is selected.
5. Enter '0' in the From option and '100' in the To option:
Figure 18. Value Validation Example, From/To Option
All values subsequently entered into 'Dropdown1' must fall into the range 0-100. Values outside of the specified range will not be permitted, and if they are entered then an error message will appear. |
The default settings of dropdown menus use a list item as the display name. The process below details how to create a different display name for dropdown menus:
A default dropdown menu is detailed below and the display name is 'Item 1':
Figure 19. Default Dropdown Menu
1. Click the Form Tab, then click Select Fields and select the dropdown menu.
2. Click the Format tab, then click Properties. The Dropdown Properties pane will open:
Figure 20. Dropdown Menu Tool, Dropdown Properties Pane
3. Scroll down the Dropdown Properties pane to the Allow Edit property and change the setting to Yes:
Figure 21. Dropdown Menu Tool, Allow Edit Property
4. Click the Home tab and select the Hand Tool, then click the dropdown menu and enter the desired display name. This example will use 'Select...':
Figure 22. New Dropdown Menu Display Name
5. Click the Form tab and click Select Fields, then select the dropdown menu and click Properties in the Format tab. The Dropdown Properties pane will open:
Figure 23. Dropdown Menu Tool, Dropdown Properties Pane
6. Scroll down the Dropdown Properties pane to the Allow Edit property and change the setting to No:
Figure 24. Dropdown Properties Pane,, Allow Edit Property
The dropdown menu will display as detailed below:
Figure 25. Dropdown Menu, New Display Name |