designMode Attribute (view Element)
Determines whether the view (*.xsl) file specified in a view element can be opened in design mode in Microsoft Office InfoPath 2007.
|view||Contains information about a Microsoft Office InfoPath 2007 view.|
You can create a custom view for a form template by creating an XSL Transformation (XSLT) (*.xsl) file that contains constructs that are not supported in design mode in InfoPath. To ensure that a view can't be opened in design mode (and to prevent data loss), set the designMode attribute in the form definition file (.xsf) to "protected". Protected views are shown in all views lists and users can be fill them out like all forms, but they cannot be opened in design mode. If the designMode attribute is specified as "normal" or is not specified, the view can be opened in design mode.
In Office InfoPath 2007, if you perform any of the following actions, InfoPath sets the value of the designMode attribute for the view element that contains these items to "protected":
- Insert a ComboBox control
- Insert a Multiple Selection List Box control
- Insert a Combo Box, Drop-Down List Box, or List Box control, and then select the Show only entries with unique display names check box on the Data tab of the control's Properties dialog box.
- Enable digital signatures for data in a Section control
Additionally, when you perform one of these actions, InfoPath also sets the value of the designMode attribute for the viewExtension element to "normal". This prevents the view from being edited in Design mode if the form template is opened in InfoPath 2003, but still allows it to be edited in Design mode when the form template is opened in Office InfoPath 2007. If you want to prevent the view from being edited in both InfoPath 2003 and Office InfoPath 2007, then you must manually edit the manifest.xsf file for the form template and change the value of the the designMode attribute for the viewExtension element to "protected".
The following is an example of the designMode attribute as it is used in the view element: