How to add xsd field element into an existing XML schema

I have falled foul of this.  There are a couple of ways to add xsd field elements into a manifest designed infopath form in Visual Studio 2005.  However, I can only seem to get one way to work so thought it was worth blogging this for future reference.
Without this, you will receive errors about the schema xsd file being invalid.
1. Double click your schema file (e.g. myschema.xsd) from Solution Explorer in VS2005.  You must close your manifest.xsf design down first.
2. Make sure your XML Schema toolbox is displayed.  The drag and drop an element into the design view
3. Give your new element a name (e.g. txtEmailAddress) and set a data type (e.g. String)
4. Then in your fields element list, add an individual element, selecting the new element you created through the predictive text.
5. Job done.  Your new data element is available to use.  Now you need to add your field into the manifest.xsf (design) of the form.
6. Select you new field element from the data source view and then drag and drop the element into your manifest form design.
7. Compile, publish and test the form in your destination SharePoint library.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s