Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

XML Documents

Note

This section is only relevant if you will be working with XML data either directly or indirectly (e.g. [[V4_Create_Update_ConfluencePages| Updating Confluence pages]]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 primarily with XML schemas, please see [[V4_Data_Sources_and_Schemas|Schemas]].

With Live Forms , you can create two kinds of forms:

  • Top-down: drag and drop controls from the palette and Live Forms 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 Live Forms and Live Forms 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.

...

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 two Panels. Each panel has two controls. Below this Section is a Repeating Section called Incident which itself contains two controls.

border
Section
true
Column
width100px

 

Form with Section and Repeat

Column
width100px

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, Live Forms generates  generates an XML document that looks like the one below:

...

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 [[V4_Forms _ Home _Page|Forms Home Page]] documentation 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):

...

This can happen if you are using the Live Forms 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.

Tip

An upcoming version of Live Forms of  (currently estimated for late Q1 or Q2 Q3 2012) will permit versioning of forms/flows so existing submissions can be edited using older versions of the form/flow.