customize a button InfoPath 2007

Author: mety Labels::



After you insert a button on a form template, you can customize it by changing properties and settings in the Button Properties dialog box. To open the dialog box, on the form template, double-click the button whose properties you want to change.
The following table describes some of the ways in which you can customize a button and offers reasons why you might do so. Although the table doesn't provide detailed procedural information about the options in the Button Properties dialog box, it does give you an idea of the range of options that are available.
TabTask Details
General
Assign an action to the button
In the Action list, define what you want to have happen when the user clicks the button. If you want the button to submit data to a single data source, click Submit. If you want rules (rule: A condition or action, or a set of conditions or actions, that automatically performs tasks based on events and values in the form.) or custom code to run when the button is clicked, click Rules and Custom Code.
The Submit and Rules and Custom Code actions are always available. The availability of other button actions depends on how the form template was designed and whether the form template includes a data connection that queries or submits data to external data sources, such as a database or Web service.
ActionDescription
SubmitThis action initiates the standard submit functionality for the form — this is the same as the user clicking Submit on the File menu. To initiate a custom submit action, select Rules and Custom Code, and then create a rule for submitting the data.
Rules and Custom CodeThis action either runs a rule when the button is clicked or runs custom code. For example, you can create a rule that automatically submits the data from a form to a Web service or submits the data as an e-mail message, in response to the user clicking the button. To define a rule, click Rules. To define code, click Edit Form Code.
Run QueryIf the form is connected to a database or Web service, this action queries a database or Web service based on the values entered in the fields that are used to query the data.
New RecordIf the form is connected to a database or Web service, this action clears the values on the form so that a user can enter new data.
Delete & SubmitIf the form is connected to a database or Web service, this action deletes the records from the database that have been returned in a query.
RefreshIf the form is connected to a database or Web service, this action refreshes the data from the database or Web service that has been returned in a query.
Update FormIn a form that is designed to be filled out in a Web browser, this action updates form data in an incremental manner. For example, imagine a Total box that changes based on the values that users enter in other controls on the form. To avoid refreshing the form whenever the values in those controls change, you can prevent data from being sent to the server for those specific controls. You can then add an Update Totals button next to the Total box, which the user can click to manually refresh the totals. The button associated with the Update Form action is visible only when users display and fill out the form in the browser.
General
Change the button label
In the Label box, type the text that you want to display on the face of the button. If you want the text on the button to change depending on values on the form, click Insert Formula Button image, and then select the field that stores the value that you want to use. For example, you can create a button with the label Send To Manager, where Manager is the name that a user types in a Manager text box elsewhere on the form.
General
Obtain the button identifier
You can use the ID listed on this tab to identify the button in code. You can also change the default name of the button ID so that it is easier for you to remember.
General
Write custom code
General
Assign rules to automate the button's behavior
Click Rules to open the Rules dialog box, where you can create rules that run when the button is clicked. For example, you can set up a rule that opens a new form or switches views (view: A form-specific display setting that can be saved with a form template and applied to form data when the form is being filled out. Users can switch between views to choose the amount of data shown in the form.) when users click the button.
Display
Add conditional formatting
Click Conditional Formatting to open the Conditional Formatting dialog box, where you can change the appearance of a control, including its visibility, based on values that users enter into the form. For example, you can choose to hide one or more buttons unless a specific check box is selected by the user.
Size
Adjust size, padding, and margins
You can manually specify the size of a control by entering values in the Height and Width boxes. You can also refine the spacing both inside and outside the control by changing the padding, which is the amount of buffer space surrounding the control's contents, or the margins, which is the amount of space between the control's border and any surrounding text or controls on the form template.
Advanced
Specify a ScreenTip
To make an explanatory note appear when users move their pointer over the control, enter the text that you want in the ScreenTip box. Accessibility aids, such as screen review utilities that make on-screen information available as synthesized speech or a refreshable Braille display, often rely on these ScreenTips to interpret information for their users.
Advanced
Change the tab index order
You can change the position of a control in the form template's overall tab order. Tab order is the order in which the focus moves in a form from one field or object to the next as users press TAB or SHIFT+TAB. The default tab index setting for all controls in a form template is 0, but the tab order starts with 1. That is, any control with 1 in the Tab index box will be visited first when users press the TAB key. Any control with 2 in the Tab index box will be visited second, and so on. Any controls with 0 in the Tab index box will come last in the tab order. If you want to skip controls in the tab order, enter -1 in the Tab index box.
Advanced
Assign a keyboard shortcut
You can type a letter or number in the Access key box to specify a keyboard shortcut. Keyboard shortcuts enable users to navigate to a control by pressing a combination of keystrokes, rather than by moving the mouse. If you choose to use keyboard shortcuts in your form template, you must communicate to users that the shortcuts exist. For example, you might type (ALT+S) after a text box label to let users know that there's a keyboard shortcut for a Salesperson text box.
Browser forms
Customize settings for posting data back to the server
The Browser forms tab appears only when you are designing a browser-compatible form template. It allows you to control whether data is sent to the server when users click the button on the form.

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2