Here's an example file for the address table.

<form id="address">
  <field id="address_type_no"/>
  <field id="line1"/>
  <field id="line2"/>
  <field id="line3"/>
  <field id="line4"/>
  <field id="state_code"/>
  <field id="postcode"/>
  <field id="city"/>
  <field id="country_code"/>

As you can see it only controls what to include and the order on the simplest level, it's possible to add a label="Label" if the description defined in the table data isn't enough. It's also possible to add lists and a few other things.


The attributes for this are LABEL, TEMPLATE and SQL. Label is simply the label to show before the output and SQL is the query to run. It's possible to enter the template as an argument, but also to put it as CDATA content inside the tag. This will simply run the query and fill in the template with the data required.


List defines linked lists, it works the same at it does for wizards, with the exception that the first <table> entry should be used to link the data to the current record, USING="fieldname" can be used to tell the system what field should be used to link them together.


A when section controls when to show the content inside it. Two attributes can be used, field and equals, it looks like this: <when field="fld1" equals="ex"> ... contained layout </when>.

It can be used to limit some fields to only show when a field in the data contains a specific value.


The attributes for field are ID - the field name, LABEL - if the standard label from tables.struct should be overridden in some cases, FLAGS that can be RO for Read Only. Field will display as an editable field if the form is used to add or edit data, and as plain text if it's a readonly view. The actual display will depend on the data type used in the database, for example will ENUM fields in the database give you check boxes, SET will show a drop down, different type of dates shows a calendar lookup. If a field referes to another table, the rows in that table will show in a drop-down list.


<form> is the containing tag, the only argument is ID that has the name of the table that the form edits.


This is similar to <list> but can only be used with a single related table. On the plus side it's editable directly by the user in the interface. While list is generic in it's usage, llist is tailored to adding linked data to head records. It can be used for adding, deleting and modifying. <llist> takes a few attributes directly that is included inside the list tag.

<llist> attributes

id - the ID of the list.

table - what directly linked table should be used.

label - what label to put in front of the list.

Inside the llist use <display> similar to <list> but with only the field and label attributes where label is optional and the header will default to the name given in the structure file.