If
you want users to initiate actions such as submitting data, executing
a web service operation, or executing a database query, you can
add a button to the form. With the help of Designer’s built-in support
for client-server communications and scripting, forms can support
these kinds of actions through buttons:
Execute a calculation
Process and manipulate data through a script
Submit data (including optional attachments) to a server
Sign submitted form content
Encrypt submitted form content
Open a connection to a host
Submit client requests to a server
Invoke a web service operation
Query a data source
The actions associated with the button are initiated when the
user clicks the button.
After you add a button object to the form design, you can edit
the caption text and manipulate the object’s properties in the Field,
Submit, and Execute tabs of the Object palette. You can define these
properties:
Change the caption for the button
Set a border style for the button
Specify the highlight style for the button
Define the button as visible, invisible, or hidden
Specify a locale for the button
Specify run-time behavior
Designer also includes four additional buttons that are preconfigured
to provide specific functions. They include an email submit button,
an HTTP submit button, a print button, and a reset button.
Email submit buttonsThe
email submit button is a standard button that has certain properties
already set and a specialized Object palette. This object makes
it easier for you to create buttons that users can click to return
their form data by email. Because Adobe Reader does not save changes
to PDF files, including form data, it is a good idea to include
an email submit button on forms that users may fill in Adobe Reader.
The email submit button operates like a standard button object
with these settings:
Control Type set to Submit
Submit Format set to XML Data
Submit To URL set to use the mailto: protocol, such as mailto:name@adobe.com
Encoding set to UTF-8
If you use the New Form Assistant to create a form and select
one of the Submit return methods, an email submit button will be
included on the form automatically.
After you add a button to the form design, you can edit the caption
text, and you can manipulate the object’s properties in the Field
tab of the Object palette. You can define these properties:
Change the caption for the button
Set a border style for the button
Specify the highlight style for the button
Set the To address and the Subject of the email message
Sign submitted form content
Encrypt submitted form content
Define the button as visible, invisible, or hidden
Specify a locale for the button
You can also change the button name in the Hierarchy palette
and set a style for the caption in the Font and Paragraph palettes.
To configure the email submit buttonYou can specify the e-mail address
that the form data will be sent to and the subject line of the email
that will be sent.
Add an email submit button to the
form design. See To add objects to a form design.
In the Object palette, click the Field tab.
In the Email Address box, type the e-mail address you want
to send the submission to.
(Optional) In the Email Subject box, type a subject line
for the e-mail.
(Optional) To apply a data signature to the submitted data,
select Sign Submission and then click Settings to configure optional
signature settings.
(Optional) To apply XML encryption to the form content, select
Encrypt Submission and then click Settings to configure optional
encryption settings.
HTTP submit buttonsThe
HTTP submit button is a standard button that has certain properties
already set and a specialized Object palette. This object makes
it easier for you to create buttons that users can click to return
their form data by HTTP post.
The HTTP submit button operates like a standard button object
with these settings:
Control Type set to Submit
Submit Format set to URL-Encoded Data
Submit To URL set to use the http: protocol
If your data needs to be returned through the secure https: protocol,
you can also use the standard button object.
After you add a button to the form design, you can edit the caption
text, and you can manipulate the object’s properties in the Field
tab of the Object palette. You can define these properties:
Change the caption for the button
Set a border style for the button
Select the highlight style for the button
Specify the URL that the data will be sent to
Sign submitted form content
Encrypt submitted form content
Define the button as visible, invisible, or hidden
Specify a locale for the button
You can also change the button name in the Hierarchy palette
and set a style for the caption in the Font and Paragraph palettes.
To configure the HTTP submit buttonAdd
an HTTP submit button to the form design. See To add objects to a form design.
In the Object palette, click the Field tab and type the URL
protocol in the URL box.
To
|
Use this URL protocol
|
Example
|
Submit the package to an ftp site
|
ftp
|
ftp://ftp.gnu.org/gnu/GPL
|
Submit the package to a web server
|
http
|
http://myserver/cgi-bin/
|
Submit the package to a secure web server
|
https
|
https://myserver/cgi-bin/
|
Submit the package to an email address
|
mailto
|
mailto:username@domain.com
|
Note: When submitting data to
a URL, it is recommended that you specify an absolute target. Relative
targets are interpreted relative to the user environment, which
can vary from one user to the next at run time.
(Optional) To apply a data signature to the submitted data,
select Sign Submission and then click Settings to configure optional
signature settings.
(Optional) To apply XML encryption to the form content, select
Encrypt Submission and then click Settings to configure optional
encryption settings.
Print buttonsThe
print button opens a Print dialog box so that the user can print
the form. A Print button is a standard button object that has the
Control Type set to Regular and a script included in the button’s click event
that prints the form when the button is clicked.
In the stand-alone
version of Designer, if you use the New Form Assistant to create
a form and select one of the Print return methods, a print button
will be included on the form automatically.
Reset buttonsA reset
button resets all fields on the form to their default values. The
Reset button object is a standard button object that has the Control
Type set to Regular and a script included in the button’s click event
that resets the field values when the button is clicked.
To insert a standard button that runs a calculation or scriptAdd the button to a form design. See To add objects to a form design.
In the Object palette, click the Field tab.
Select an event from the Show box. For example, if you want
the button to perform a calculation, select Click.
In the Script Editor, select a language from the Language
list.
Type the calculation or script in the Script Editor.
|
|
|