How to create a required string field for an InfoPath data source

If you are using Visual Studio Tools for Applications to develop your managed code for an InfoPath form, please follow these steps.
 
Delete the txtEmailAddress field from your manifest.
 
DO NOT EDIT THE DATA SOURCE THROUGH YOUR GUI OR THE MANIFEST.XSF PROPERTY. This will break your form!!!!
 
Edit a custom schema file
 
In a text editor such as Notepad or in an XML editor, create the following schema. Then, save the schema asCustomschema.xsd.

Once completed, re-add your field by dragging and dropping it across from the Data Source.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s