Set the default value for a control

A default value is the initial value a control contains when the form is first opened by a user. Default values are stored in fields (field: An element or attribute in the data source that can contain data. If the field is an element, it can contain attribute fields. Fields store the data that is entered into controls.) and are displayed in the controls that are bound (bind: To connect a control to a field or group in the data source so that data entered into the control is saved. When a control is unbound, it is not connected to a field or group, and so data entered into the control will not be saved.) to those fields.

ShowSet the default value for a text box, rich text box, date picker, or list control

  1. In design mode, double-click the control whose default value you want to set.
  2. In the Default value box on the Data tab in the Properties dialog box, type the default value.

ShowSet the default value for a list box or drop-down list box

  1. In design mode, double-click the list box or drop-down list box whose default value you want to set.
  2. Under List box entries on the Data tab in the Properties dialog box, select the list entry you want to set as the default value, and then click Set Default.

 Note   The default value that will be stored in the form is specified in the Value column; the Display Name column specifies the value that will appear on the form.

ShowSet the default value and default state for a check box

The default value of a check box is a combination of its default state (checked or cleared) and the value associated with that state.

  1. In design mode, double-click the check box whose default value you want to set.
  2. To change the default state of the check box (that is, the state the check box is in when the form is first opened), click Cleared or Checked on the Data tab in the Check Box Properties dialog box.
  3. To change the value stored in the data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.) when the check box is cleared or checked, click the value you want in the Value when cleared list and the Value when checked list.

 Note   By default, the check box's field contains the value "FALSE" when the check box is cleared and "TRUE" when the check box is checked.

ShowSet the default value and default state for a group of option buttons

To set the default value for a group of option buttons, you must specify the default option button and the value of that option button.

  1. In design mode, double-click the option button that you want to set as the default button.
  2. In the Value when selected box on the Data tab in the Option Button Properties dialog box, enter the value of the option button when it is selected.
  3. Select the This button is selected by default check box.

 Note   In a group of option buttons, only one can be selected by default.

 Note   To set the default values for an optional section (optional section: A control on a form that contains other controls and that usually does not appear by default. Users can insert and remove optional sections when filling out the form.), repeating section (repeating section: A control on a form that contains other controls and that repeats as needed. Users can insert multiple sections when filling out the form.), or repeating table (repeating table: A control on a form that contains other controls in a table format and that repeats as needed. Users can insert multiple rows when filling out the form.), you can use the procedures above for the individual controls that appear in the section or table.