I managed to successfully bind a schema to a basic form and aside from some Reader Enabled issues it works as expected.
My next project is to do the same but with a form that features repeating subforms.
I have written my schema and validated and all seems well. When I bind it to the form though it makes certain fields behave in an odd way.
The form is made up of three sections. The first is a single subform of non repeating fields. Parts Two is a table with repeating rows and Part Three is a collection of fields with an Add/Delete button using the instance manager script.
When I bind these fields and add rows I get strange results. In Part Two pressing the Add button copies the entire row rather than creating a new one. Changing the value of one row changes the others.
In Part Three I can create entirely new subforms using the Add button but the this.parent.index +1; script stops working.
Does anyone know why this might be happening and how I can resolve it?
The schema is below:
<xsd:element name = "RemoteWorking">
<xsd:complexType>
<xsd:sequence>
<xsd:element name = "PartZero">
<xsd:complexType>
<xsd:sequence>
<xsd:element name = "RequireAddHardWare" />
<xsd:element name = "RequireRemoteWork" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name = "PartOne">
<xsd:complexType>
<xsd:sequence>
<xsd:element name = "Surname" />
<xsd:element name = "FirstName" />
<xsd:element name = "UserName" />
<xsd:element name = "JobTitle" />
<xsd:element name = "Role" />
<xsd:element name = "LineManager" />
<xsd:element name = "Directorate" />
<xsd:element name = "PersonnelCategory" />
<xsd:element name = "CONumber" />
<xsd:element name = "TelephoneNumber" />
<xsd:element name = "BuildingCode" />
<xsd:element name = "RoomNumber" />
<xsd:element name = "WorkingHours" />
<xsd:element name = "AltContact" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name = "PartTwo" maxOccurs = "unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name = "AdditionalHardware" maxOccurs = "unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name = "PartThree" maxOccurs = "unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name = "ItemRequired" />
<xsd:element name = "UserAccountName" />
<xsd:element name = "CostCentre" />
<xsd:element name = "BusinessCase" />
<xsd:element name = "Device" />
</xsd:sequence>
<xsd:attribute name="ItemNo" type="xsd:integer" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name = "PartFour">
<xsd:complexType>
<xsd:sequence>
<xsd:element name = "Unite" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>