Consolo’s xml-defined forms contain both data and information about how the data should be edited. Thanks to this, as a developer, you decide what data the editor will be able to edit and what the form will look like.
An xml-form is written in this form:
An unlimited number of variable names can be given. For every variable, you set the corresponding type of data. For every data type, there is one or more pre-defined attributes. The actual data should be attached as content in the respective node.
In the table below, are the data types you can choose from, together with the expected attributes for every data type.
| Data Type | Attribute | Description |
|---|---|---|
checkbox |
Check box (integer) that can have the value 0 or 1. | |
caption |
Text on label (string) | |
date |
Date (string). A text field where only numbers 0-9 and the character - (dash) are allowed. Max width is 10 characters. The field type will be improved in future versions. | |
caption |
Text on label (string) | |
file |
File (string), chosen from another media archive than the Image Archive. | |
caption |
Text on label (string) | |
archive |
Integer 2-6 which decides from what archive the file will be chosen. 2 = document, 3 = flash, 4 = video, 5 = soundfile, 6 = other. < /SPAN > | |
heading |
Header, non editable. | |
hidden |
Hidden variable which is not displyed in the form. Non editable. | |
html |
Html-code to be edited in the WYSIWYG-editor. Note that the code must be placed in a CDATA-node, e.g. <![CDATA[<body><p>text</p></body>]]> | |
width |
Width of the editor window in pixels (integer). | |
image |
Image (string), chosen from the Image Archive. | |
caption |
Text on label (string) | |
notes |
Large text-box (string), saved in an encrypted format. Corresponds to Consolo’s meta-value notes in html. | |
caption |
Text on label (string) | |
number |
Number (integer or float). A text field where only the numbers 0-9 and the characters , . - (comma, period and dash) are allowed. | |
caption |
Text on label (string) | |
readonly |
Small text-box (string), non editable. | |
caption |
Text on label (string) | |
select |
Multiple choice box (string or integer). | |
caption |
Text on label (string) | |
options |
List with strings displayed in the box, separated by | pipe. | |
data |
List with ID-numbers (integers) separated with | pipe. Listan must correspond to the list in options. If data is not assigned, the string set in options will be used for value. Not a mandatory attribute. | |
text |
Small text-box (string) | |
caption |
Text on label (string) | |
maxlength |
The maximum length (integer) of the text set in number of characters. | |
textarea |
Large text-box (string). | |
caption |
Text on label (string) | |
maxlength |
The maximum length (integer) of the text set in number of characters. | |
time |
Time (string). A text field where only numbers 0-9 and the characted : (colon) are allowed. The maximum length is 8 characters. This field type will be improved in future versions. | |
caption |
Text on label (string) | |