Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add multiple fields to the form via an XML file

...

Hidden fields can also be added to forms so that you might pass hidden data (e.g. system data you need submitted back but don't want the user to see). Simply add the field with a unique field name and the value to populate and it will be added to the end of the form. Then, when a user submits the form, the hidden data will be submitted too.

Example:

Code Block
languagevb
titleSample Code
'Load data

...

 via XML 
objQFE.LoadXML("C:\Temp\LoadXMLExample.xml")

Structure

Quik! Fields are defined by a "parent" field – the top-most field that indicates the data set type (e.g. client, account, company, representative, etc.) – and a "base" field – the lowest level field that defines the data element (e.g. first name, date of birth, address line 1, etc.).

...

  • FieldBackgroundColor
  • RequiredByField
  • RequiredByFieldValues
  • SemiRequired
  • AttachTitle
  • AttachFile
  • RegEx

New XML Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="ParentField">
		<xs:complexType>
			<xs:sequence maxOccurs="unbounded">
				<xs:element name="Field">
					<xs:complexType>
						<xs:all>
							<xs:element name="FieldName" type="xs:string" minOccurs="1" nillable="false"/>
							<xs:element name="FieldValue" minOccurs="0" type="xs:string" nillable="true"/>
							<xs:element name="FieldReadOnly" minOccurs="0" type="xs:boolean" nillable="true"/>
							<xs:element name="FieldVisibility" minOccurs="0" type="xs:integer" nillable="true"/>
							<xs:element name="FieldRequired" minOccurs="0" type="xs:boolean" nillable="true" />
							<xs:element name="FieldFormat" minOccurs="0" type="xs:string" nillable="true"/>
							<xs:element name="FieldMask" minOccurs="0" type="xs:boolean" nillable="true"/>
							<xs:element name="FieldCalcOverride" minOccurs="0" type="xs:boolean" nillable="true" />
							<xs:element name="HiddenField" minOccurs="0" type="xs:boolean" nillable="true"/>
							<xs:element name="FieldBackgroundColor" minOccurs="0" type="xs:string" nillable="true"/>
							<xs:element name="RequiredByField" minOccurs="0" type="xs:string" nillable="true"/>
							<xs:element name="RequiredByFieldValues" minOccurs="0" type="xs:string" nillable="true"/>
							<xs:element name="SemiRequired" minOccurs="0" type="xs:boolean" nillable="true"/>
							<xs:element name="AttachTitle" minOccurs="0" type="xs:string" nillable="true"/>
							<xs:element name="AttachFile" minOccurs="0" type="xs:boolean" nillable="true"/>
							<xs:element name="RegEx" minOccurs="0" type="xs:string" nillable="true"/>
						</xs:all>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

Sample Code

...

1. To apply a red background color to field 1own.FName, a valid XML looks like the following:


Code Block
languagexml
titleXML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>


VB.NET

Code Block
languagevb
titleVB.NET
objQFE.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>")

C#

Code Block
languagec#
titleC#
objQFE.LoadXML("<?xml version=\"1.0\" encoding="\UTF-8\" standalone=\"yes\"?><ParentField><Field><FieldName>1own.FName</FieldName><FieldBackgroundColor>#ff0000</FieldBackgroundColor></Field></ParentField>")


2. To make 1own.FName field Semi Required, a valid XML looks like the following:

Code Block
languagexml
titleXML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>



VB.NET

Code Block
languagevb
titleVB.NET
objQFE.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>")

C#

Code Block
languagec#
titleC#
objQFE.LoadXML("<?xml version=\"1.0\" encoding="\UTF-8\" standalone=\"yes\"?><ParentField><Field><FieldName>1own.FName</FieldName><SemiRequired>true</SemiRequired></Field></ParentField>")