Live Forms v7.4 is no longer supported. Please visit Live Forms Latest for our current Cloud Release. Earlier documentation is available too.

XML Documents

This section is only relevant if you will be working with XML data either directly or indirectly (e.g. Updating Confluence Pages). This section is primarily relevant to from-palette controls that are dragged from the palette and dropped into the form. If you are working with XML schemas, please see Schemas.

With , you can create two kinds of forms:

  • Top-down: drag and drop controls from the palette and  will generate an XML document based on the structure of your form.
  • Bottom-up: define your data upfront using an XML schema, upload it to  and  will generate controls. You can then drag and drop to move the controls, change their appearance etc. However, the generated XML document will always conform to the uploaded XML schema irrespective of where the controls are moved.

You can mix the two approaches, i.e. you can create a form that has, for example, controls generated from two different XML schemas and some from-palette controls. The result will be three documents.

Top-down forms (from palette)

This is the most common type of form where you drag and drop controls from the palette. The form is shown below in the designer. It contains a Section named Personal. Inside this Section there are four controls. Below this Section is a Repeating Section called Incident which itself contains a section which contains two controls.

 

Form with Section and Repeat

Use Mode form filled with data

The form is shown filled in above. We've filled in all the fields and added a second repeating incident. When the form is submitted,  generates an XML document that looks like the one below:

<p0:form xmlns:p0="http://www.frevvo.com/schemas/_q4ALUCo7EeSVzearsRTK1g"> 
  <Personal> 
    <Text27>John</Text27> 
    <LastName>Doe</LastName> 
    <Phone>202.202.2020</Phone> 
    <EmailAddress>johndoe@yahoo.com</EmailAddress> 
  </Personal> 
  <Incident> 
    <Date>2010-08-01</Date> 
    <Description>Parking Ticket</Description> 
  </Incident> 
  <Incident> 
    <Date>2015-08-08</Date> 
    <Description>Speeding Ticket</Description> 
  </Incident> 
</p0:form>

Note that the structure of the generated XML document matches the structure of the form. You can download an XML schema that describes the document that the form will generate by clicking on the Schema button for the form. See the Forms Home Page documentation for details.

If the structure of the form is changed, the generated XML document (and associated schema will change). For example, if you add a new Section - say it's called Info - and nest both the existing Personal Section and the Incident Repeat inside this new Section, the XML document will change to reflect this change as shown below (snipped for brevity):

<p0:form xmlns:p0="http://www.frevvo.com/schemas/_q4ALUCo7EeSVzearsRTK1g"> 
  <Info> 
    <Personal/> 
    <Incident/> 
  </Info> 
</p0:form>

Why is this important? It's only important if you are using the form to edit existing submissions, i.e. to edit the XML documents they have generated. To do so, the form must first be initialized using the XML document. If the structure of the XML document does not match the structure of the form (or more accurately, if the XML schemas are incompatible), the initialization will fail and you cannot edit the submission using the form.

This can happen if you are using the  API in your application to edit submissions or if you are using the Create/Update Confluence pages functionality. In these cases, you must be very careful that you maintain the structure of the form. You can add new fields or delete existing ones. But you cannot make changes that change the schema of the generated XML.

If you don't want to worry about making sure that form versions remain compatible, you can always use the from-schema bottom-up path to generate forms from XML schemas. In this case, changes to the form will not change the document since it must conform to the schema. The downside is that you must first define the XML schema and then use it in the form, which requires some technical knowledge of XML and XML schemas.