Author a Bare-bones Form XML Document
The GenerateFormXML console application reads a simple XML document using the limited schema to create a Nintex Forms XML document.
Bare-bones Schema
The XML used to create the basic document uses the following schema:
<form>
<control>
<number>Integer</number>
<type>Type [ListBox, Image, Label, Button, TextBox, YesNo] </type>
<text>String</text>
<height>Integer</height>
<width>Integer</width>
</control>
</form>
Notes on working with the bare-bones forms
The Nintex Simple Form Builder (GenerateFormXML) will not elegantly handle errors in your bare-bones form XML. Note that the form types are case-sensitive; note the capitalization of ListBox and TextBox. If you are passing a blank value to the generator from the bare-bones form xml, use a blank entity such as ;  rather than a space. The order of controls is set by the order in the XML file rather than by control number.
Bare-bones Elements
The following table details the bare-bones elements:
Element | Data Type | Description |
---|---|---|
Form | Complex Element | Required. The root element of the schema. |
Control | Complex Element | Required. The root element of a control section. |
Number | Integer | Optional. The number of the element. |
Type |
List |
Required. Valid values include:
|
Text | String |
Required. The text used for text elements in the control properties such as the label text, alt text for an image, and the control name. |
Height | Integer | Required. Used to specify the height of the control in the control layout. Used to calculate the control position in the control layout. |
Width | Integer | Required. Used to specify the width of the control in the control layout. Used to calculate the control position in the control layout. |
URL | String | Optional (required for an Image control type) |
Choices | Complex Element | Optional (required for a ListBox control type) |
String | Optional (required for a ListBox control type) |
Table of Controls
The following table contains an explanation of the controls and sample XML for each control type.
Icon | Name | XML Name | Description | XML Fragment |
---|---|---|---|---|
![]() |
Choice | ListBox | The Choice control can be used to make selections on a form. |
<control> <number>13</number> <type>ListBox</type> <text>Club</text> <height>50</height> <width>150</width> <choices> <choice>Football Club</choice> <choice>Fencing Club</choice> <choice>Chess Club</choice> <choice>Sewing Club</choice> </choices> </control> |
![]() |
Image | Image | The Image control can be used to display an image on a form. |
<control> <number>1</number> <type>Image</type> <text>Banner</text> <height>100</height> <width>700</width> <url>http://that-or-this.com/sdk/banner_update.png</url> </control> |
![]() |
Label | Label | The Label control can be used to place text anywhere on the form. Labels are often placed next to other controls to describe the associated control. |
<control> <number>2</number> <type>Label</type> <text>Contact Information Form</text> <height>50</height> <width>700</width> </control> |
![]() |
Button | Button | The Button control can be used to initiate an action, such as submitting a form or initiating a custom JavaScript. |
<number>15</number> <type>Button</type> <text>Submit</text> <height>50</height> <width>150</width> </control> |
![]() |
TextBox | TextBox | The Single Line Textbox control allows users to enter plain text on a form. |
<control> <number>4</number> <type>TextBox</type> <text>Enter first name</text> <height>50</height> <width>200</width> </control> |
![]() |
Boolean | YesNo | The Yes /No control allows users to check or uncheck a box to show that an item has been selected |
<control> <number>4</number> <type>YesNo</type> <text>Enter first name</text> <height>50</height> <width>50</width> </control> |
Example of the Bare-bondes Form XML
<form>
<control>
<number>1</number>
<type>Image</type>
<text>Banner</text>
<height>100</height>
<width>700</width>
<url>http://that-or-this.com/sdk/banner_update.png</url>
</control>
<control>
<number>2</number>
<type>Label</type>
<text>Contact Information Form</text>
<height>50</height>
<width>700</width>
</control>
<control>
<number>3</number>
<type>Label</type>
<text> First Name:</text>
<height>50</height>
<width>150</width>
</control>
<control>
<number>4</number>
<type>TextBox</type>
<text>Enter first name</text>
<height>50</height>
<width>200</width>
</control>
<control>
<number>5</number>
<type>Label</type>
<text>Last Name:</text>
<height>50</height>
<width>150</width>
</control>
<control>
<number>6</number>
<type>TextBox</type>
<text>Enter last name</text>
<height>50</height>
<width>200</width>
</control>
<control>
<number>7</number>
<type>Label</type>
<text>City</text>
<height>50</height>
<width>150</width>
</control>
<control>
<number>8</number>
<type>TextBox</type>
<text>Enter city</text>
<height>50</height>
<width>550</width>
</control>
<control>
<number>9</number>
<type>Label</type>
<text>State: </text>
<height>50</height>
<width>150</width>
</control>
<control>
<number>10</number>
<type>TextBox</type>
<text>Enter state</text>
<height>50</height>
<width>550</width>
</control>
<control>
<number>11</number>
<type>Label</type>
<text>Zip: </text>
<height>50</height>
<width>150</width>
</control>
<control>
<number>12</number>
<type>TextBox</type>
<text>Enter Zip</text>
<height>50</height>
<width>550</width>
</control>
<control>
<number>13</number>
<type>ListBox</type>
<text>Club</text>
<height>50</height>
<width>150</width>
<choices>
<choice>Football Club</choice>
<choice>Fencing Club</choice>
<choice>Chess Club</choice>
<choice>Sewing Club</choice>
</choices>
</control>
<control>
<type>Label</type>
<text> </text>
<height>50</height>
<width>700</width>
</control>
<control>
<number>15</number>
<type>Button</type>
<text>Submit</text>
<height>50</height>
<width>150</width>
</control>
</form>
Overview of the GenerateFormXML Code Sample