Chapter 4. Building the base scenario: Stage 1 95
4.6.3 Adding a Submit button
To add user-triggered actions to your XFDL form, you can add buttons to it that can execute a
broad range of actions, as listed in Table 4-2.
Table 4-2 Actions of buttons within XFDL
You can place buttons both in the form and in the form’s toolbar. Buttons placed in the toolbar
are fully functional, but are not printed as part of the form. Placing eForm-only items, such as
e-mail, print, or next page buttons, in a toolbar, allows your form to function as an eForm and
a paper form.
To create a Submit button as in our example, do the following steps:
1. Create a button and double-click it.
–The
Properties dialog box opens.
2. In the
General tab, click the pop-up list under Perform This Action.
The pop-up list opens, displaying a number of actions.
Action Description
Enclose File Allows users to enclose multiple files
Display Enclosure Allows users to select an enclosed file to view
Extract Enclosure Allows users to extract an enclosed file and save it
Remove Enclosure Allows users to remove an enclosed file from the form
Enclose Single Item Allows users to enclose a single file in the form; if there is already a
file enclosed, the new file replaces it
Extract Single Item Allows users to extract the item and save it to disk
Display Single Item Displays the file
Remove Single Item Deletes the file
Go To Page Switches the view to another page in the form
Link to File Opens a file from the Internet or the user’s computer and displays it
in either the Viewer or a Web browser
Replace with File Replaces the form with another file; this file can reside on the
Internet or on the user’s computer
Submit Data Submits form data to a server, leaving the form open
Submit Then Cancel Submits form data to a server and closes the form
Signature Allows users to sign the form
Select Allows users to indicate a choice
Cancel Closes the form without submitting or saving
Print Prints the form
Save Saves the form
96 IBM Workplace Forms: Guide to building and integrating a sample Workplace Forms application
3. Select Submit Then Cancel and click Details as seen in Figure 4-34.
–The
Submit Then Cancel Action Details dialog box opens (Figure 4-35).
Figure 4-34 General properties of Submit button
4. Under Transmit Format leave XFDL selected.
5. Under
Compression leave Uncompressed selected.
6. Under
URL enter the appropriate URL of your submission servlet, either in absolute or
relative fashion.
a. Enter relative URL: /WPFormsRedpaper/SubmissionServlet?action=store
b. Click Add.
c. Exit the Details window by clicking OK, then exit the Properties window by clicking OK.
Figure 4-35 Submit Then Cancel Action Details dialog box

Get IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.