To show the Script Editor Select
Window > Script Editor. Note: You can use the
Expand button to quickly dock or undock the Script Editor when it
is displayed in the Designer workspace.
To change from single-line to multiline view Drag the Script Editor palette bar
until the palette is the required size. Note: Multiline
view adds the All Events and Events with Scripts options to the Show
list. The All Events option displays all of the events for a particular
form design object, even if the events do not contain any calculations
or scripts. The Events with Scripts option displays only those events
of a particular object that contain calculations or scripts.
To set the default scripting language for new formsSelect Tools > Options.
Click Workspace.
In the Default Language For New Forms list, select the default
scripting language for new forms.
To set the default scripting language for the current formSelect File > Form Properties.
Click the Defaults tab.
In the Default Language list, select the default scripting
language for the currently displayed form.
To set the default scripting language for a form templateCreate a new form design.
Select File > Form Properties.
Click the Defaults tab.
Select your default scripting language from the Default Language
list.
Make a backup of the original form template file located
in the Templates folder where Designer is installed.
Save the new form design as a TDS file and overwrite the
corresponding form template. For example, save the file as Letter.tds
and overwrite the Letter.tds file located in Templates\Blank folder.
To set the default processing applicationSelect File > Form Properties.
Click the Defaults tab.
Select your default processing application from the Default
Run At list.
Note: This procedure only sets the
value of the default processing application for the current instance
of the form.
To avoid changing the default processing application
each time you create a form, you must modify the corresponding form
template file that is used to create a new form design.
To change the default processing application for a form templateCreate a new form design.
Select File > Form Properties.
Click the Defaults tab.
Select your default processing application from the Default
Run At list.
Make a backup of the original form template file located
in the Templates folder where Designer is installed.
Save the new form design as a TDS file and overwrite the
corresponding form template. For example, save the file as Letter.tds
and overwrite the Letter.tds file located in Templates\Blank folder.
To display Arabic, Hebrew, Thai, and Vietnamese charactersTo display Arabic, Hebrew,
Thai, and Vietnamese characters in the Script Editor or XML Source
tab, you must change the font settings that Designer uses in these tabs.
Otherwise, Designer displays rectangles where the language-specific characters
should be.
Select Tools > Options and select Workspace from the
list on the left.
Select one of the following options:
FormCalc
Syntax Formatting to set the font in the Script Editor when you use
FormCalc
JavaScript Syntax Formatting to set the font in the Script
Editor when you use JavaScript
XML Source Syntax Formatting to set the font in the XML Source
tab
In the Font box, select a font that supports your language.
For example, Adobe Arabic supports Arabic, Adobe Hebrew supports
Hebrew, Adobe Thai supports Thai, and Myriad® Pro
and Minion® Pro support Vietnamese. You
can locate the font you need for your language on the Internet if
it is not already on your system.
Click OK.
Click OK to close the Options dialog box.
Using the workspace to debug calculations and scriptsThe Designer workspace provides a number
of ways to assist you with debugging your calculations and scripts.
The following table provides the location and purpose of some
helpful debugging information located on various Designer palettes
and tabs.
Workspace location
|
Purpose
|
Warnings tab in the Report palette
|
Displays target and warning marker messages
as well as all JavaScript or FormCalc scripting syntax errors when
you select the Check Script Syntax command from the Tools menu or
click the Check Script Syntax button in the Tools toolbar. For more
information, see To check script syntax.
When you double-click a syntax
warning message in the Warnings tab, the script that contains the error
is loaded into the Script Editor, and the line with the error is
highlighted.
You can also double-click a warning message to
select the related object in the Design View and the Hierarchy palette,
and press F1 to display information about how to fix the warnings.
To
check for JavaScript run-time errors, you can activate the JavaScript
Console. For more information, see JavaScript Debugging.
|
Binding tab in the Report palette
|
If you include fields on your form design
that are bound to a data source, the Binding tab can assist you
by displaying lists of fields based on how you defined their data
binding. For example, you can list only fields with Global Data
Binding or only those with no data binding defined. This feature
is especially useful on forms that have a large number of data bound
fields.
|
Log tab in the Report palette
|
Displays validation messages, JavaScript
or FormCalc scripting execution errors, and design-time form rendering
errors generated by Designer when you import or save a form, or
preview a form using the Preview PDF tab.
|
Hierarchy palette
|
You can use the Hierarchy palette to determine
the location of a form object for a reference syntax. The Hierarchy
palette is a graphical representation of the structure of a form.
It displays the contents of the Master Pages and Design View tabs.
The
Hierarchy palette also displays referenced objects under the Referenced
Objects node. A referenced object is an object that is added
to a form only when it is required. Whenever data flows across multiple
pages or content areas, the overflow leader and trailer subforms
are inserted into the form in the appropriate places.
|
Binding tab in the Object palette
|
Every Designer object that can be bound
to a data source includes a Binding tab in the Object palette. If
you bind an object on your form design to a particular data node
from your data connection, the Data Binding (Open, Save, Submit)
list displays a valid FormCalc reference syntax for accessing that data
node. You can use the FormCalc reference syntax in other calculations
or scripts for testing purposes.
|
XML Source tab
|
The XML Source tab contains the form design’s
XML code. The XML source code defines all aspects of the form. You
can use the XML Source tab to view the XML Form Object Model structure
of a form design and to understand the relationships between objects
and properties. In the XML source, the XML element names are equivalent
to the object names in the XML Form Object Model, and attributes
are equivalent to properties.
When you select an object in
the Hierarchy palette and then click the XML Source tab, the first
line of the corresponding element is highlighted. The object name
in Designer, as listed in the Hierarchy palette, becomes the value
of the name attribute in the XML source.
You
can set options in the Tools > Options dialog box for viewing
the source in the XML Source tab, such as showing or hiding line
numbers and setting the syntax coloring.
It is recommended
that you do not edit the XML source code directly.
|
You may also find it useful to change the default options for
the Script Editor to make it easier to debug your calculations and
scripts. These options are in the Workspace panel of the Options
dialog box, which is available by selecting Tools > Options and
then selecting Workspace from the list on the left. For example, you
can choose to display line numbers in the Script Editor or change
the formatting of FormCalc or JavaScript syntax.
|
|
|